Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace Totem.Bootstrap.Lex
- type TokenKind =
- | Error of string
- | Comment of string
- | EndOfFile
- | NewLine
- | Indent
- | WhiteSpace
- | Symbol of Symbol
- | Operator of Symbol list
- | Keyword of Keyword
- | Identifier of string
- | Literal of Literal
- and Literal =
- | String of string
- | Integer of int
- | Long of int64
- | Float of float32
- | Double of double // more types follows
- // another file:
- namespace Totem.Bootstrap.Syntax
- module internal Parser =
- let (|String|_|) (token:Token) =
- match token.Kind with
- | Lex.Literal (Lex.Literal.String (s)) -> Some (s, token)
- | _ -> None
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement