-
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
module Types = Css_types; | ||
module Parser = Css_parser; | ||
module Location = Ppxlib.Location; | ||
|
||
/** Signals a lexing error at the provided source location. */ | ||
exception LexingError((Lexing.position, Lexing.position, string)); | ||
|
||
/** Makes the lexer be aware of whitespaces or not */ | ||
let skip_whitespace: ref(bool); | ||
|
||
type token_with_location = { | ||
txt: result(Tokens.token, (Tokens.token, Tokens.error)), | ||
loc: Types.loc, | ||
}; | ||
|
||
let get_next_token: Sedlexing.lexbuf => Parser.token; | ||
let get_next_tokens_with_location: | ||
Sedlexing.lexbuf => (Parser.token, Lexing.position, Lexing.position); | ||
let from_string: string => result(list(token_with_location), [> | `Frozen]); | ||
let tokenize: | ||
string => | ||
result(list((Parser.token, Lexing.position, Lexing.position)), string); | ||
let render_token: Parser.token => string; | ||
let position_to_string: Lexing.position => string; | ||
let debug_token: ((Parser.token, Lexing.position, Lexing.position)) => string; | ||
let to_string: list((Parser.token, 'a, 'b)) => string; | ||
let to_debug: | ||
list((Parser.token, Lexing.position, Lexing.position)) => string; |