aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorRyo Nihei <nihei.dev@gmail.com>2021-05-27 22:14:53 +0900
committerRyo Nihei <nihei.dev@gmail.com>2021-05-27 22:14:53 +0900
commite6bd501a9d6a33f5b0b5c67cb4b4af76cb4c5572 (patch)
treef123dd54095ee8f6b7f7544ca71780ec3549ae8d /README.md
parentAdd fragment expression (diff)
downloadtre-e6bd501a9d6a33f5b0b5c67cb4b4af76cb4c5572.tar.gz
tre-e6bd501a9d6a33f5b0b5c67cb4b4af76cb4c5572.tar.xz
Allow duplicate names between fragments and non-fragments
Diffstat (limited to 'README.md')
-rw-r--r--README.md16
1 files changed, 8 insertions, 8 deletions
diff --git a/README.md b/README.md
index eef1233..bb0f558 100644
--- a/README.md
+++ b/README.md
@@ -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.