handling marker tokens
This commit is contained in:
1 parent
ad97447bfd
commit
b1df45a53b
5 files changed
+32
-9
No files matched your search
@@ -67,7 +67,7 @@ public class Tokenizer implements Iterator<Tokenizer.Token>
|
||||
|
||||
public static List<Token> simplepass(String input)
|
||||
{
|
||||
Tokenizer tok = new Tokenizer(null, input);
|
||||
Tokenizer tok = new Tokenizer(null, input, false, false);
|
||||
List<Token> res = new ArrayList<>();
|
||||
while (tok.hasNext()) res.add(tok.next());
|
||||
return res;
|
||||
@@ -233,6 +233,9 @@ public class Tokenizer implements Iterator<Tokenizer.Token>
|
||||
lineno++;
|
||||
linepos = 0;
|
||||
}
|
||||
token.append(greedyMatch);
|
||||
token.type = Token.TokenType.MARKER;
|
||||
return token; // skipping setting previous
|
||||
}
|
||||
pos++;
|
||||
linepos++;
|
||||
|
||||
Reference in new issue
Block a user