diff options
author | Ryo Nihei <nihei.dev@gmail.com> | 2021-05-27 22:14:53 +0900 |
---|---|---|
committer | Ryo Nihei <nihei.dev@gmail.com> | 2021-05-27 22:14:53 +0900 |
commit | e6bd501a9d6a33f5b0b5c67cb4b4af76cb4c5572 (patch) | |
tree | f123dd54095ee8f6b7f7544ca71780ec3549ae8d /README.md | |
parent | Add fragment expression (diff) | |
download | tre-e6bd501a9d6a33f5b0b5c67cb4b4af76cb4c5572.tar.gz tre-e6bd501a9d6a33f5b0b5c67cb4b4af76cb4c5572.tar.xz |
Allow duplicate names between fragments and non-fragments
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -113,14 +113,14 @@ top level object: entry object: -| Field | Type | Nullable | Description | -|----------|------------------|----------|-----------------------------------------------------------------------------------------------| -| kind | string | false | A name of a token kind | -| pattern | string | false | A pattern in a regular expression | -| modes | array of strings | true | Mode names that an entry is enabled in (default: "default") | -| push | string | true | A mode name that the lexer pushes to own mode stack when a token matching the pattern appears | -| pop | bool | true | When `pop` is `true`, the lexer pops a mode from own mode stack. | -| fragment | bool | true | When `fragment` is `true`, its entry is a fragment. | +| Field | Type | Nullable | Description | +|----------|------------------|----------|-----------------------------------------------------------------------------------------------------------------------| +| kind | string | false | A name of a token kind. The name must be unique, but duplicate names between fragments and non-fragments are allowed. | +| pattern | string | false | A pattern in a regular expression | +| modes | array of strings | true | Mode names that an entry is enabled in (default: "default") | +| push | string | true | A mode name that the lexer pushes to own mode stack when a token matching the pattern appears | +| pop | bool | true | When `pop` is `true`, the lexer pops a mode from own mode stack. | +| fragment | bool | true | When `fragment` is `true`, its entry is a fragment. | See [Regular Expression Syntax](#regular-expression-syntax) for more details on the regular expression syntax. |