Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New recipe: Case-insensitivity #233

Merged
merged 4 commits into from
May 23, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
First thoughts
Lotes committed May 22, 2024
commit c7b98dea96c6460d13758b6c22bafd1db81bb79b
4 changes: 4 additions & 0 deletions hugo/content/docs/recipes/lexis/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: Lexis"
weight: 100
---
18 changes: 18 additions & 0 deletions hugo/content/docs/recipes/lexis/case-insensitive-languages.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
title: "Case-insensitive languages"
weight: 100
---

* case-insensitive languages are more suitable for beginners, because they don't have to worry about the case of identifiers and keywords
* there are basically two options you can choose from:
* you can either make Langium case-insensitive by configuration
* or you can include case-insensitivity only where you need it

## Case-insensitive Langium

* to make Langium case-insensitive, you have to set the `caseInsensitive` option in the `LangiumConfig` object

## Case-insensitivity on demand

* if you want to include case-insensitivity only where you need it, you can use the `i` flag inside of your grammar regexes
* do not forget to adjust your scoping as well!
4 changes: 4 additions & 0 deletions hugo/content/docs/recipes/syntax/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: "Syntax"
weight: 200
---
Empty file.
Empty file.