Compare commits
No commits in common. "ce80e00e606fb4c3217761f01aa9771a8801e308" and "ffccc659aad28ff8c97c117c98e4e94e711ca89a" have entirely different histories.
ce80e00e60
...
ffccc659aa
@ -22,6 +22,8 @@ class <%= @classname %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
_TOKEN_COUNT = <%= @grammar.tokens.size %>,
|
||||
_TOKEN_DECODE_ERROR = <%= TOKEN_DECODE_ERROR %>,
|
||||
_TOKEN_DROP = <%= TOKEN_DROP %>,
|
||||
}
|
||||
|
||||
struct Token
|
||||
@ -406,6 +408,7 @@ class <%= @classname %>
|
||||
if (decoded.is_decode_error())
|
||||
{
|
||||
result.type = Result.Type.DECODE_ERROR;
|
||||
result.token = _TOKEN_DECODE_ERROR;
|
||||
return;
|
||||
}
|
||||
bool lex_continue = false;
|
||||
|
@ -25,6 +25,12 @@ require_relative "propane/version"
|
||||
|
||||
class Propane
|
||||
|
||||
# Decoding error.
|
||||
TOKEN_DECODE_ERROR = 0xFFFFFFFD
|
||||
|
||||
# Token ID for a "dropped" token.
|
||||
TOKEN_DROP = 0xFFFFFFFE
|
||||
|
||||
class Error < RuntimeError
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user