From 8c7f13df7842f17797c6bea4d2a2f661397a2d08 Mon Sep 17 00:00:00 2001 From: TheZoq2 Date: Fri, 13 Oct 2023 21:27:37 +0200 Subject: [PATCH 1/2] Add LPF tree sitter --- languages.toml | 12 ++++++++++++ runtime/queries/lpf/highlights.scm | 19 +++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 runtime/queries/lpf/highlights.scm diff --git a/languages.toml b/languages.toml index 048c76bb4a0c..cb22d5144eff 100644 --- a/languages.toml +++ b/languages.toml @@ -932,6 +932,18 @@ indent = { tab-width = 2, unit = " " } name = "lean" source = { git = "https://github.com/Julian/tree-sitter-lean", rev = "d98426109258b266e1e92358c5f11716d2e8f638" } + +[[language]] +name = "lpf" +comment-token = "#" +scope = "source.lpf" +file-types = ["lpf"] +roots = [] + +[[grammar]] +name = "lpf" +source = { git = "https://gitlab.com/TheZoq2/tree-sitter-lpf", rev = "db7372e60c722ca7f12ab359e57e6bf7611ab126" } + [[language]] name = "julia" scope = "source.julia" diff --git a/runtime/queries/lpf/highlights.scm b/runtime/queries/lpf/highlights.scm new file mode 100644 index 000000000000..80656fc203cd --- /dev/null +++ b/runtime/queries/lpf/highlights.scm @@ -0,0 +1,19 @@ +[ + "SYSCONFIG" + "BLOCK" + "LOCATE" + "COMP" + "FREQUENCY" + "PORT" + "IOBUF" +] @keyword + +["SITE"] @storage + +["="] @operator + +((number) @constant.numeric) + +((string) @string) +((line_comment) @comment) + From 4e1c69705410b138e830db5648f4403344eba60e Mon Sep 17 00:00:00 2001 From: Frans Skarman Date: Wed, 25 Oct 2023 09:25:29 +0000 Subject: [PATCH 2/2] Update runtime/queries/lpf/highlights.scm Co-authored-by: Michael Davis --- book/src/generated/lang-support.md | 1 + runtime/queries/lpf/highlights.scm | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/book/src/generated/lang-support.md b/book/src/generated/lang-support.md index 429f54f557ee..f188f1cb4752 100644 --- a/book/src/generated/lang-support.md +++ b/book/src/generated/lang-support.md @@ -89,6 +89,7 @@ | llvm | ✓ | ✓ | ✓ | | | llvm-mir | ✓ | ✓ | ✓ | | | llvm-mir-yaml | ✓ | | ✓ | | +| lpf | ✓ | | | | | lua | ✓ | ✓ | ✓ | `lua-language-server` | | make | ✓ | | | | | markdoc | ✓ | | | `markdoc-ls` | diff --git a/runtime/queries/lpf/highlights.scm b/runtime/queries/lpf/highlights.scm index 80656fc203cd..836aef84638c 100644 --- a/runtime/queries/lpf/highlights.scm +++ b/runtime/queries/lpf/highlights.scm @@ -8,7 +8,7 @@ "IOBUF" ] @keyword -["SITE"] @storage +["SITE"] @keyword.storage ["="] @operator