Skip to content

Commit

Permalink
Added optional '-' to 0
Browse files Browse the repository at this point in the history
  • Loading branch information
Kartik Thakore committed Feb 13, 2013
1 parent fc2bb4d commit d517e03
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/scala/org/moe/parser/Literals.scala
Expand Up @@ -9,7 +9,7 @@ trait Literals extends Base {

// Numeric literals
def zeroNumber: Parser[IntLiteralNode] =
"""0""".r ^^ { n => IntLiteralNode(0) }
"""-?0""".r ^^ { n => IntLiteralNode(0) }
def intNumber: Parser[IntLiteralNode] =
"""-?[1-9][0-9_]*""".r ^^ { n => IntLiteralNode(formatInt(n)) }
def octIntNumber: Parser[IntLiteralNode] =
Expand Down

0 comments on commit d517e03

Please sign in to comment.