Skip to content

Commit

Permalink
Made sure the mapping of valid lexer state is not exported.
Browse files Browse the repository at this point in the history
  • Loading branch information
Knetic committed Dec 25, 2014
1 parent 8e5640d commit 44adcf2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lexerState.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ type lexerState struct {

// lexer states.
// Constant for all purposes except compiler.
var VALID_LEXER_STATES = []lexerState {
var validLexerStates = []lexerState {

lexerState {

Expand Down
4 changes: 2 additions & 2 deletions parsing.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ func parseTokens(expression string) ([]ExpressionToken, error) {
var err error
var found bool

state = VALID_LEXER_STATES[0];
state = validLexerStates[0];
stream = newLexerStream(expression);

for stream.canRead() {
Expand All @@ -43,7 +43,7 @@ func parseTokens(expression string) ([]ExpressionToken, error) {
// append this valid token, find new lexer state.
ret = append(ret, token)

for _, possibleState := range VALID_LEXER_STATES {
for _, possibleState := range validLexerStates {

if(possibleState.kind == token.Kind) {

Expand Down

0 comments on commit 44adcf2

Please sign in to comment.