From 5b70d6342e582bc152a0403356ce57a6cc9df249 Mon Sep 17 00:00:00 2001 From: Novus Nota <68142933+novusnota@users.noreply.github.com> Date: Sun, 26 May 2024 22:48:15 +0200 Subject: [PATCH] feat: add language Tact More about the language: https://tact-lang.org Hope everything's nice here :) --- README.md | 1 + languages.json | 6 ++++++ tests/data/tact.tact | 20 ++++++++++++++++++++ 3 files changed, 27 insertions(+) create mode 100644 tests/data/tact.tact diff --git a/README.md b/README.md index 83889caeb..bd0b1937b 100644 --- a/README.md +++ b/README.md @@ -517,6 +517,7 @@ Svg Swift Swig SystemVerilog +Tact Tcl Tex Text diff --git a/languages.json b/languages.json index ac548b971..626263a48 100644 --- a/languages.json +++ b/languages.json @@ -1515,6 +1515,12 @@ "quotes": [["\\\"", "\\\""]], "extensions": ["sv", "svh"] }, + "Tact": { + "line_comment": ["//"], + "multi_line_comments": [["/*", "*/"]], + "quotes": [["\\\"", "\\\""]], + "extensions": ["tact"] + }, "Tcl": { "name": "TCL", "line_comment": ["#"], diff --git a/tests/data/tact.tact b/tests/data/tact.tact new file mode 100644 index 000000000..9493b7dc2 --- /dev/null +++ b/tests/data/tact.tact @@ -0,0 +1,20 @@ +// 20 lines 12 code 4 comments 4 blanks + +import "@stdlib/deploy"; // comment + +/* comment */ +fun global() { + let str: String = "\n \r \t \u1234 \xFF"; + + // comment + while (true) { // comment + if /* comment */ (true) { /* comment */ } + } +} + +// "quoted" +struct St { /* " */ + field1: Int; // /* + field2: Int as uint128; + field3: Int; // */ +}