mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-24 00:52:18 +01:00
Remove token ID/Key distinction, part 1 of N
This commit is contained in:
1 parent
06ff3d3369
commit
afd7429e9a
4 files changed
+190
-151
No files matched your search
+2
-2
@@ -54,7 +54,7 @@ func (m *Map) Insert(name string) (ID, error) {
|
||||
if key > maxKey {
|
||||
return 0, errors.New("token: too many distinct tokens")
|
||||
}
|
||||
flags := FlagsImplicitSemicolon
|
||||
flags := Flags(0)
|
||||
if numeric(name[0]) {
|
||||
flags |= FlagsLiteral | FlagsNumLiteral
|
||||
} else if name[0] == '"' {
|
||||
@@ -132,7 +132,7 @@ loop:
|
||||
|
||||
if c <= ' ' {
|
||||
if c == '\n' {
|
||||
if len(tokens) > 0 && tokens[len(tokens)-1].IsImplicitSemicolon() {
|
||||
if len(tokens) > 0 && tokens[len(tokens)-1].ID.IsImplicitSemicolon() {
|
||||
tokens = append(tokens, Token{IDSemicolon, line})
|
||||
}
|
||||
if line == maxLine {
|
||||
|
||||
Reference in new issue
Block a user