Skip to content
Permalink
Browse files

#121. Fixes lexing for dot op.

  • Loading branch information...
AZHenley committed Feb 19, 2019
1 parent 123eb4f commit 7154402daa99209047c19a74677a942e1bb2fff4
Showing with 5 additions and 1 deletion.
  1. +5 −1 lexer/lexer.go
@@ -256,7 +256,11 @@ func (l *Lexer) peekChar() rune {

// determinate ch is identifier or not
func isIdentifier(ch rune) bool {
return !isWhitespace(ch) && !isBrace(ch) && !IsOperator(ch) && !isComparison(ch) && !isCompound(ch) && !isBrace(ch) && !isParen(ch) && !isBracket(ch) && !isEmpty(ch)
return !isWhitespace(ch) && !isBrace(ch) && !IsOperator(ch) && !isComparison(ch) && !isCompound(ch) && !isBrace(ch) && !isParen(ch) && !isBracket(ch) && !isEmpty(ch) && !isDot(ch)
}

func isDot(ch rune) bool {
return ch == rune('.')
}

// is white space

0 comments on commit 7154402

Please sign in to comment.
You can’t perform that action at this time.