mirror of
https://github.com/AppleCommander/bastools.git
synced 2025-01-03 01:29:28 +00:00
Bypassed bug somewhat. If two parts to a token were found, the Optional
logic was not correct. Instead of fixing, just returned the Token from the if statement. Closes #9.
This commit is contained in:
parent
3f4c47551a
commit
8b8b26258a
@ -102,6 +102,7 @@ public class TokenReader {
|
|||||||
next(depth-1)
|
next(depth-1)
|
||||||
.filter(t -> opt.get().parts.get(1).equals(t.text))
|
.filter(t -> opt.get().parts.get(1).equals(t.text))
|
||||||
.orElseThrow(() -> new IOException("Expecting: " + opt.get().parts));
|
.orElseThrow(() -> new IOException("Expecting: " + opt.get().parts));
|
||||||
|
return Optional.of(Token.keyword(line, opt.get()));
|
||||||
}
|
}
|
||||||
return Optional.of(opt
|
return Optional.of(opt
|
||||||
.map(kw -> Token.keyword(line, kw))
|
.map(kw -> Token.keyword(line, kw))
|
||||||
|
Loading…
Reference in New Issue
Block a user