mirror of
https://github.com/zaphar/ucg.git
synced 2025-07-22 18:19:54 -04:00
CLEANUP: Comment cleanup.
This commit is contained in:
parent
cfd5f085cd
commit
40494fb90e
@ -132,8 +132,6 @@ named!(number<TokenIter, Value, error::Error>,
|
||||
)) |
|
||||
do_parse!( // 1
|
||||
prefix: match_type!(DIGIT) >>
|
||||
// The peek!(not!(..)) make this whole combinator slightly
|
||||
// safer for partial inputs.
|
||||
(Some(prefix.clone()), None, None)
|
||||
)),
|
||||
triple_to_number
|
||||
@ -754,16 +752,6 @@ named!(non_op_expression<TokenIter, Expression, error::Error>,
|
||||
simple_expression)
|
||||
);
|
||||
|
||||
// NOTE(jwall): HERE THERE BE DRAGONS. The order for these matters
|
||||
// a lot. We need to process alternatives in order of decreasing
|
||||
// specificity. Unfortunately this means we are required to go in a
|
||||
// decreasing size order which messes with alt!'s completion logic. To
|
||||
// work around this we have to force Incomplete to be Error so that
|
||||
// alt! will try the next in the series instead of aborting.
|
||||
//
|
||||
// *IMPORTANT*
|
||||
// It also means this combinator is risky when used with partial
|
||||
// inputs. So handle with care.
|
||||
named!(expression<TokenIter, Expression, error::Error>,
|
||||
alt!(complete!(op_expression) | complete!(non_op_expression))
|
||||
);
|
||||
|
@ -116,9 +116,9 @@ named!(booleantok( Span ) -> Token,
|
||||
/// less code.
|
||||
macro_rules! do_tag_tok {
|
||||
// NOTE(jwall): Nom macros do magic with their inputs. They in fact
|
||||
// rewrite your macro argumets for you. Which means we require this $i
|
||||
// paramater even though we don't explicitely pass it below. I don't
|
||||
// particularly like this but I'm living with it for now.
|
||||
// rewrite your macro argumets for you by adding an initial argument
|
||||
// for all their sub-macros. Which means we require this $i paramater
|
||||
// on the first macro invocation but not the rest.
|
||||
($i:expr, $type:expr, $tag:expr) => {
|
||||
do_parse!(
|
||||
$i,
|
||||
|
Loading…
x
Reference in New Issue
Block a user