Skip to content

Commit

Permalink
Merge pull request #272 from mitiemann/mitie/add_public_keyword
Browse files Browse the repository at this point in the history
add `public` keyword to the grammar
  • Loading branch information
pfitzseb authored Jan 10, 2024
2 parents 5be44fc + 22db3f1 commit 3fee1e4
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ All notable changes to the Julia grammar will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [Unreleased]
### Fixed
- new Julia 1.10 keyword `public` is now parsed correctly([#271](https://github.com/JuliaEditorSupport/atom-language-julia/issues/271))

## [0.22.0] - 2021-11-07
### Fixed
Expand Down
4 changes: 4 additions & 0 deletions grammars/julia.cson
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,10 @@ repository:
match: '\\b(?<![:_])(?:export)\\b'
name: 'keyword.control.export.julia'
}
{
match: '\\b(?<![:_])(?:public)\\b'
name: 'keyword.control.public.julia'
}
{
match: '\\b(?<![:_])(?:import)\\b'
name: 'keyword.control.import.julia'
Expand Down
4 changes: 4 additions & 0 deletions grammars/julia.json
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,10 @@
"match": "\\b(?<![:_])(?:export)\\b",
"name": "keyword.control.export.julia"
},
{
"match": "\\b(?<![:_])(?:public)\\b",
"name": "keyword.control.public.julia"
},
{
"match": "\\b(?<![:_])(?:import)\\b",
"name": "keyword.control.import.julia"
Expand Down
4 changes: 4 additions & 0 deletions grammars/julia_vscode.json
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,10 @@
"match": "\\b(?<![:_])(?:export)\\b",
"name": "keyword.control.export.julia"
},
{
"match": "\\b(?<![:_])(?:public)\\b",
"name": "keyword.control.public.julia"
},
{
"match": "\\b(?<![:_])(?:import)\\b",
"name": "keyword.control.import.julia"
Expand Down
13 changes: 13 additions & 0 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -715,6 +715,19 @@ describe('Julia grammar', function () {
},
])
})
it("tokenizes public statements", function () {
const tokens = tokenize(grammar, "public some_public_function")
compareTokens(tokens, [
{
value: "public",
scopes: ["keyword.control.public.julia"]
},
{
value: " some_public_function",
scopes: []
},
])
})
it("tokenizes symbols", function () {
const tokens = tokenize(grammar, ":à_b9!")
compareTokens(tokens, [
Expand Down

0 comments on commit 3fee1e4

Please sign in to comment.