package ochre
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=820412863edca3173c7365cf16b4b4bad41c8fffbb4bfba8f0d87a40d4ad525b
sha512=f8a16876281504e714fe465df8a1a9894a90f06fc6cead07534722c0aa83abf955d9951e66549ac78a016e27fe8cdc5596f415e26f1c5309ee893722078f56ae
doc/ochre.textmate_language/TmLanguage/index.html
Module TmLanguageSource
The collection of TextMate grammars.
A TextMate grammar.
The error message is purely informational and is not to be matched on.
type plist = [ | `Bool of bool| `Data of string| `Date of float * float option| `Float of float| `Int of int| `String of string| `Array of plist list| `Dict of (string * plist) list
]A plist document. This is the same type as t defined in the plist-xml package (as of version 0.3.0), but is reproduced here as not to depend on plist-xml.
type ezjsonm = [ | `Null| `Bool of bool| `Float of float| `String of string| `A of ezjsonm list| `O of (string * ezjsonm) list
]A JSON document. This is the same type as value defined in the ezjsonm package (as of version 1.2.0), but is reproduced here as not to depend on ezjsonm.
type yojson = [ | `Null| `Bool of bool| `Int of int| `Float of float| `String of string| `Assoc of (string * yojson) list| `List of yojson list
]A JSON document. This is the same type as Basic.t defined in the yojson package (as of version 1.7.0), but is reproduced here as not to depend on yojson.
Finds a grammar by its name attribute. Case-insensitive.
Finds a grammar by its scopeName attribute. Case-sensitive.
Finds a grammar by matching one of the strings in its fileTypes attribute. Case-sensitive.
Reads a TextMate grammar from a PLIST file. Raises Error if the plist does not represent a valid TextMate grammar.
Reads a TextMate grammar from a JSON file. Raises Error if the plist does not represent a valid TextMate grammar.
Reads a TextMate grammar from a JSON file. Raises Error if the plist does not represent a valid TextMate grammar.
The state of the tokenizer.
A token of code.
One past the index of the last character of the token.
If tok is the first token of the line, tok spans the substring within interval [0, ending tok). If tok succeeds a token prev, tok spans the substring within interval [ending prev, ending tok).
Usage: let tokens, stack = tokenize_exn t grammar stack line
Tokenizes a line of code. Returns the list of tokens tokens and the updated tokenization state stack.
Precondition:
linemust be a single line, including the newline character at the end.
Postconditions:
tokensis nonempty.- The ending positions of
tokensare strictly increasing. - The
endingof the last token intokensis alwaysString.length line.
Raises Error if it tries to match a malformed end or while regex.
Raises Error if it tries to access a local repository that doesn't exist in the file. Currently, it silently ignores includes of other grammars that don't exist in t.