diff options
author | Charlie Stanton <charlie@shtanton.xyz> | 2023-04-20 09:36:50 +0100 |
---|---|---|
committer | Charlie Stanton <charlie@shtanton.xyz> | 2023-04-20 09:36:50 +0100 |
commit | b95e5ddaa1b182dfe58a386bfc107fa7d95c4393 (patch) | |
tree | 41c6e8141e5a7afcbb963e2ce1344bf238c98018 /main/lex.go | |
parent | 6a77b63c3cd4edb992b94e42c5a222a1480a3f33 (diff) | |
download | stred-go-b95e5ddaa1b182dfe58a386bfc107fa7d95c4393.tar |
Remove the need for a semicolon after each command
Diffstat (limited to 'main/lex.go')
-rw-r--r-- | main/lex.go | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/main/lex.go b/main/lex.go index e82c309..02dd0ee 100644 --- a/main/lex.go +++ b/main/lex.go @@ -460,13 +460,9 @@ func lexCommandEnd(l *lexer) stateFunc { l.emit(TokenEOF) return nil } - if l.accept(";") { - l.emit(TokenSemicolon) - return lexCommand - } if l.accept("}") { l.emit(TokenRBrace) return lexCommandEnd } - return l.errorf("Expected ; found something else") + return lexCommand } |