Support parsing float literals in Bergamot
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
This commit is contained in:
parent
29a95d2659
commit
4c12fee4aa
|
@ -10,9 +10,6 @@ import Set exposing (Set)
|
|||
reserved : Set String
|
||||
reserved = Set.fromList ["section"]
|
||||
|
||||
intLit : Parser Int
|
||||
intLit = Parser.int
|
||||
|
||||
strLit : Parser String
|
||||
strLit =
|
||||
let
|
||||
|
@ -78,7 +75,13 @@ term = Parser.lazy (\() -> Parser.oneOf
|
|||
|= name
|
||||
, Parser.backtrackable <|
|
||||
Parser.succeed Var |= variable
|
||||
, Parser.succeed IntLit |= intLit
|
||||
, Parser.number
|
||||
{ int = Just IntLit
|
||||
, hex = Nothing
|
||||
, octal = Nothing
|
||||
, binary = Nothing
|
||||
, float = Just FloatLit
|
||||
}
|
||||
, Parser.succeed StringLit |= strLit
|
||||
])
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user