Skip to content

Commit

Permalink
Add J language support (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
eNascimento178 authored Jun 12, 2024
1 parent 7cfafa6 commit 9527124
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
7 changes: 7 additions & 0 deletions languages.json
Original file line number Diff line number Diff line change
Expand Up @@ -726,6 +726,13 @@
"quotes": [["''", "''"]],
"extensions": ["thy"]
},
"J":{
"name": "J",
"line_comment": ["NB."],
"quotes": [["'", "'"]],
"verbatim_quotes": [["'", "'"]],
"extensions": ["ijs", "jproj"]
},
"Jai": {
"name": "JAI",
"line_comment": ["//"],
Expand Down
27 changes: 27 additions & 0 deletions tests/data/j.ijs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
NB. 27 lines 16 code 4 comments 7 blanks

foo=: 5 NB. uncounted comment

NB. single line comment
bar=: 'A string with ''quotes'''

ed=: 0 : 0
explicit defined string
)

ed2=: 3 :0
+: y NB. uncounted comment inside explicit definition
)

dd1=: {{)n
explicit defined string using direct definitions
}}

Note
multi line comment with the `Note` keyword
cannot be identified at the moment
)

NB. another single line comment
NB. consecutive comments
dd2=: {{ x * y }} + 8

0 comments on commit 9527124

Please sign in to comment.