2ac387e1c9
The README.md file in the root of the repository had become too large, and as a result the file became hard to maintain. This commit extracts all the documentation and moves it to separate but managable files within the docs directory, a new folder also located in the root of the repository.
14 lines
415 B
Markdown
14 lines
415 B
Markdown
### Case-insensitivity
|
|
|
|
Appending `i` right after either [a literal](./parsing-expression-types.md#literalliteral) or a [a character set](./parsing-expression-types.md#characters) makes the match case-insensitive. The rules shown in the following example all produce the same result:
|
|
|
|
```pegjs
|
|
// without `i`
|
|
a1 = "a" / "b" / "c" / "A" / "B" / "C"
|
|
b1 = [a-cA-C]
|
|
|
|
// with `i`
|
|
a2 = "a"i / "b"i / "c"i
|
|
b2 = [a-c]i
|
|
```
|