Skip to content

Commit

Permalink
New version - bugfixes, snippet enhancements (#37)
Browse files Browse the repository at this point in the history
* Reminder for Rieks

* minor updates in changelog.md

* fixes #27 - Other box templates updated too

* snippets update for BOX types

* fixes #28

* fixes #30

* updated changelog to list fixed issues

* New version 0.3.3

* fixes #32

* bugfix in TXT-constructs

* bugfix in ROLE stattement

* update changelog

* fixed snippet bug reported by Sterre

* release 0.3.4

* update local gitignore

* bugfix - language specification in PURPOSE stmts

* fixes #35

* changelog for fixing #35

* improve snippet support for execenine violations

* Better support for CONTEXT stmts

* vsn 0.3.5
  • Loading branch information
RieksJ committed May 7, 2019
1 parent 3629789 commit 074f541
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 14 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ copyLangSupFiles.bat
##################
*.epp
~$*
Link to VSCode extensions.lnk
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
It is in the file `package.json`
-->

## [0.3.5] - 2019-05-06

- fixes issues #35
- bugfix: `IN <LANGUAGESPEC>` is now supported in PURPOSE statements
- snippets better support the creation of ExecEngine violation statements and CONTEXT statements

## [0.3.4] - 2019-04-20

- fixed PROPBUTTON snippet bug that Sterre reported by mail
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "language-ampersand",
"displayName": "Ampersand (ADL) language support",
"version": "0.3.4",
"version": "0.3.5",
"publisher": "AmpersandTarski",
"description": "Language support for Ampersand scripts",
"categories": [
Expand Down
16 changes: 11 additions & 5 deletions snippets/ampersand.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
"description": "Define a CONTEXT, and its PURPOSE. You need to add the ENDCONTEXT statement yourself",
"comment": "this snippet ensures that you do not forget to document the PURPOSE of a CONTEXT that you define",
"body":[
"CONTEXT \"${1:name}\" IN ${2|DUTCH,ENGLISH|}",
"PURPOSE CONTEXT \"$1\"",
"{+$0+}"
"CONTEXT \"${1:name}\"${2:|, IN ${3|DUTCH,ENGLISH|}|}",
"${4:|,PURPOSE CONTEXT \"$1\" {+$0+}",
"ENDCONTEXT"
]
},
"Define a concept": {
Expand Down Expand Up @@ -62,7 +62,7 @@
"Define a Relation population": {
"prefix": "POPULATION",
"description": "Define a POPULATION of Relation pairs/links",
"body":[ "POPULATION \"${1:Relname}\" CONTAINS [ (\"$2\", \"$3\") ]" ]
"body":[ "POPULATION ${1:Relname} CONTAINS [ (\"$2\", \"$3\") ]" ]
},
"SERVICE MAINTAINS RULE": {
"prefix": "SERVICE",
Expand All @@ -89,7 +89,12 @@
"VIOLATION": {
"prefix": "VIOLATION (TXT ",
"description": "Define a VIOLATION",
"body":[ "VIOLATION (TXT \"$0\")" ]
"body":[ "VIOLATION (TXT \"" ]
},
"{EX}": {
"prefix": "{EX}",
"description": "Marks the start of an ExecEngine function",
"body":[ "{EX} ${1|InsPair,DelPair,InsAtom,DelAtom,SetConcept,ClearConcept,SetNavToOnCommit,SetNavToOnRollBack,TerminateThisExecEngine,TriggerService|}" ]
},
"InsPair": {
"prefix": "InsPair",
Expand All @@ -105,6 +110,7 @@
"prefix": "NewStruct",
"description": "NewStruct is deprecated - change to InsAtom",
"body":[
"-- The function `NewStruct` is deprecated. Please use `InsAtom` instead.",
"InsAtom;${1:concept}\"",
" ,TXT \"{EX} $0"
]
Expand Down
22 changes: 14 additions & 8 deletions syntaxes/ampersand.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
{ "patterns":[
{ "comment":"PURPOSE RELATION \"<identifier>\"",
"name": "meta.purpose.relation.ampersand",
"begin": "\\b(PURPOSE)\\s+(RELATION)\\s+(?:([a-z]\\w*)|(\")([^\"]+)(\"))(?:\\s*\\[\\s*([A-Z]\\w*)\\s*(\\*)\\s*([A-Z]\\w*\\s*\\]))(?:\\s+(REF)\\s+(\")([^\"]*)(\"))?",
"begin": "\\b(PURPOSE)\\s+(RELATION)\\s+(?:([a-z]\\w*)|(\")([^\"]+)(\"))(?:\\s*\\[\\s*([A-Z]\\w*)\\s*(\\*)\\s*([A-Z]\\w*\\s*\\]))(?:\\s*(IN)\\s+(DUTCH|ENGLISH))?(?:\\s+(REF)\\s+(\")([^\"]*)(\"))?",
"beginCaptures": {
"0": { "name":"meta.purpose.begin.ampersand"},
"1": { "name":"keyword.operator.purpose.ampersand"},
Expand All @@ -151,11 +151,15 @@
"8": { "name":"variable.purpose.ampersand"},
"9": { "name":"punctuation.statement.purpose.ampersand"},
"10": { "name":"variable.purpose.ampersand"},
"11": { "name":"punctuation.statement.purpose.ampersand"},

"11": { "name":"keyword.operator.purpose.ampersand"},
"12": { "name":"keyword.operator.purpose.ampersand"},

"13": { "name":"punctuation.statement.purpose.ampersand"},
"14": { "name":"variable.purpose.ampersand"},
"15": { "name":"punctuation.statement.purpose.ampersand"}
"14": { "name":"keyword.operator.purpose.ampersand"},
"15": { "name":"punctuation.statement.purpose.ampersand"},
"16": { "name":"variable.purpose.ampersand"},
"17": { "name":"punctuation.statement.purpose.ampersand"}
},
"end": "(?<=\\+})",
"patterns": [
Expand All @@ -178,7 +182,7 @@
},
{ "comment":"PURPOSE <keyword> \"<identifier>\" -- tnx to https://github.com/Microsoft/vscode-textmate/issues/41",
"name": "meta.purpose.ampersand",
"begin": "\\b(PURPOSE)\\s+(CONTEXT|CONCEPT|RELATION|RULE)\\s+(?:(\\w+)|(\")([^\"]+)(\"))(?:\\s+(REF)\\s+(\")([^\"]*)(\"))?",
"begin": "\\b(PURPOSE)\\s+(CONTEXT|CONCEPT|RELATION|RULE)\\s+(?:(\\w+)|(\")([^\"]+)(\"))(?:\\s*(IN)\\s+(DUTCH|ENGLISH))?(?:\\s+(REF)\\s+(\")([^\"]*)(\"))?",
"beginCaptures": {
"0": { "name":"meta.purpose.begin.ampersand"},
"1": { "name":"keyword.operator.purpose.ampersand"},
Expand All @@ -188,9 +192,11 @@
"5": { "name":"variable.purpose.ampersand"},
"6": { "name":"punctuation.statement.purpose.ampersand"},
"7": { "name":"keyword.operator.purpose.ampersand"},
"8": { "name":"punctuation.statement.purpose.ampersand"},
"9": { "name":"variable.purpose.ampersand"},
"10": { "name":"punctuation.statement.purpose.ampersand"}
"8": { "name":"keyword.operator.purpose.ampersand"},
"9": { "name":"keyword.operator.purpose.ampersand"},
"10": { "name":"punctuation.statement.purpose.ampersand"},
"11": { "name":"variable.purpose.ampersand"},
"12": { "name":"punctuation.statement.purpose.ampersand"}
},
"end": "(?<=\\+})",
"patterns": [
Expand Down

0 comments on commit 074f541

Please sign in to comment.