diff options
| author | Robert Griesemer <gri@golang.org> | 2016-02-20 12:53:34 -0800 |
|---|---|---|
| committer | Robert Griesemer <gri@golang.org> | 2016-02-21 05:13:58 +0000 |
| commit | aa5b44aeabccd25a320d6ea609c41781bdbf5ce0 (patch) | |
| tree | 6e7a0c765a6128d304a123b9c322fcee8baa594a /src/database | |
| parent | 20ee67acc920807d19d336b1cc1614d2ad529953 (diff) | |
| download | go-aa5b44aeabccd25a320d6ea609c41781bdbf5ce0.tar.xz | |
cmd/compile: set lexer nlsemi state directly
The old code used an extra function call and switch to inspect the
current token and determine the new state of curio.nlsemi. However,
the lexer knows the token w/o the need of an extra test and thus
can set curio.nlsemi directly:
- removed need for extra function call in next
- renamed _yylex to next
- set nlsemi at the point a token is identified
- moved nlsemi from curio to lexer - it's really part of the lexer state
This change makes the lexer call sequence less convoluted and should
also speed up the lexing a bit.
Change-Id: Iaf2683081f04231cb62c94e1400d455f98f6f82a
Reviewed-on: https://go-review.googlesource.com/19765
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Diffstat (limited to 'src/database')
0 files changed, 0 insertions, 0 deletions
