forked from ocaml/dune
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Rudi Grinberg <me@rgrinberg.com> ps-id: 65439b6f-a4a5-4f38-bab3-58d2e59e65e2
- Loading branch information
Showing
1 changed file
with
44 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,44 @@ | ||
exception Unknown_format | ||
|
||
type lines = | ||
| Single of int | ||
| Range of int * int | ||
|
||
type source = | ||
| Code of | ||
{ code : int | ||
; name : string | ||
} | ||
| Alert of string | ||
|
||
type severity = | ||
| Error of source option | ||
| Warning of source | ||
|
||
type loc = | ||
{ chars : (int * int) option | ||
; lines : lines | ||
; path : string | ||
} | ||
|
||
type line = | ||
{ indent : int | ||
; contents : string | ||
} | ||
|
||
type token = | ||
| Toplevel of | ||
{ indent : int | ||
; loc : loc | ||
; severity : severity | ||
; message : string | ||
} | ||
| Related of | ||
{ indent : int | ||
; loc : loc | ||
; message : string | ||
} | ||
| Line of line | ||
| Eof | ||
|
||
val token : Lexing.lexbuf -> token |