Skip to content

Commit

Permalink
Release 0.0.12 (#6)
Browse files Browse the repository at this point in the history
* enhance parameterSize arr and parenthese nodes
  • Loading branch information
albertleigh committed Nov 17, 2021
1 parent 73b357a commit 2ec6aa6
Show file tree
Hide file tree
Showing 14 changed files with 32 additions and 38 deletions.
2 changes: 1 addition & 1 deletion examples/easy-example/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions examples/easy-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"@material-ui/core": "^4.12.3",
"@material-ui/icons": "^4.11.2",
"@material-ui/lab": "^4.0.0-alpha.60",
"monaco-azure-logic-app-lang": "^0.0.11",
"monaco-azure-logic-app-lang": "^0.0.12",
"monaco-editor": "^0.27.0",
"react": "^17.0.2",
"react-dom": "^17.0.2",
Expand Down Expand Up @@ -65,5 +65,5 @@
"keywords": [],
"author": "",
"license": "ISC",
"version": "0.0.11"
"version": "0.0.12"
}
2 changes: 1 addition & 1 deletion languages/monaco-az-logic-app-lang-e2e/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions languages/monaco-az-logic-app-lang-e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "monaco-az-logic-app-lang-e2e",
"private": true,
"dependencies": {
"monaco-azure-logic-app-lang": "^0.0.11",
"monaco-azure-logic-app-lang": "^0.0.12",
"monaco-editor": "^0.27.0"
},
"devDependencies": {
Expand Down Expand Up @@ -62,5 +62,5 @@
"keywords": [],
"author": "",
"license": "ISC",
"version": "0.0.11"
"version": "0.0.12"
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ function generateValidationTests(openOnePage, closeOnePage) {
"@activity('Get Metadata1').output.childItems[0].name",
"@item().one.two.three",
"@item().one['two'].three",
"@contains( [pipeline().DataFactory], [pipeline().GroupId] )",
].forEach((value, index)=>{
it(`Valid expression ${index}`, async ()=>{
let nextText, content, problems;
Expand Down
2 changes: 1 addition & 1 deletion languages/monaco-az-logic-app-lang/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions languages/monaco-az-logic-app-lang/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "monaco-azure-logic-app-lang",
"version": "0.0.11",
"version": "0.0.12",
"description": "",
"main": "./lib/index.js",
"typings": "./lib/typings/index.d.ts",
Expand All @@ -20,11 +20,11 @@
"url": "git@github.com:albertleigh/monaco-imposture-tools.git"
},
"dependencies": {
"@monaco-imposture-tools/core": "^0.0.11",
"@monaco-imposture-tools/oniguruma-asm": "^0.0.11"
"@monaco-imposture-tools/core": "^0.0.12",
"@monaco-imposture-tools/oniguruma-asm": "^0.0.12"
},
"devDependencies": {
"@monaco-imposture-tools/grammars": "^0.0.11",
"@monaco-imposture-tools/grammars": "^0.0.12",
"@types/chai": "^4.2.21",
"@types/mocha": "^9.0.0",
"@types/node": "^14.14.31",
Expand Down
31 changes: 12 additions & 19 deletions languages/monaco-az-logic-app-lang/src/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,20 +215,21 @@ export class ParenthesisNode extends SyntaxNode{
return this._cachedCommaIndices.slice();
}

public get parameterSize(){
private _ensureCommaIndicesPopulated(){
if(!this._cachedCommaIndices){
const _dummyCommaIndices = this.commaIndices;
this._cachedCommaIndices = this.commaIndices;
}
}

public get parameterSize(){
this._ensureCommaIndicesPopulated();
return this._cachedCommaIndices.length === 0?
this.content.length > 0 ? 1: 0:
this._cachedCommaIndices.length+1;
}

public parameter(index:number):SyntaxNode|undefined{
if(!this._cachedCommaIndices){
const _dummyCommaIndices = this.commaIndices;
}

this._ensureCommaIndicesPopulated();
if (
index === 0 && !(this.content[0] instanceof CommaPunctuator)
){
Expand All @@ -245,19 +246,15 @@ export class ParenthesisNode extends SyntaxNode{
}

public comma(index:number):CommaPunctuator|undefined{
if(!this._cachedCommaIndices){
const _dummyCommaIndices = this.commaIndices;
}
this._ensureCommaIndicesPopulated();
if (index >= 0 && index < this._cachedCommaIndices.length){
return this.content[this._cachedCommaIndices[index]];
}
return undefined;
}

public paramIndexByOffset(offset:number){
if(!this._cachedCommaIndices){
const _dummyCommaIndices = this.commaIndices;
}
this._ensureCommaIndicesPopulated();
if (
this.offset+1 <= offset &&
this.offset+ this.length -1 >= offset
Expand All @@ -276,9 +273,7 @@ export class ParenthesisNode extends SyntaxNode{
}

public startPosOfParameter(paramIndex:number){
if(!this._cachedCommaIndices){
const _dummyCommaIndices = this.commaIndices;
}
this._ensureCommaIndicesPopulated();
if (paramIndex <= 0){
return this.offset + 1;
}else if (paramIndex >= this._cachedCommaIndices.length + 1){
Expand All @@ -289,9 +284,7 @@ export class ParenthesisNode extends SyntaxNode{
}

public endPosOfParameter(paramIndex:number){
if(!this._cachedCommaIndices){
const _dummyCommaIndices = this.commaIndices;
}
this._ensureCommaIndicesPopulated();
if (paramIndex > this._cachedCommaIndices.length -1 ){
return this.offset + this.length -1;
}else if (paramIndex < 0){
Expand Down Expand Up @@ -642,7 +635,7 @@ export class LiteralArrayNode extends LiteralValueNode{

private _ensureCommaIndicesPopulated(){
if(!this._cachedCommaIndices){
const _dummyCommaIndices = this.commaIndices;
this._cachedCommaIndices = this.commaIndices;
}
}

Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"examples/*",
"languages/*"
],
"version": "0.0.11",
"version": "0.0.12",
"npmClient": "npm",
"command": {
"publish": {
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@monaco-imposture-tools/core",
"version": "0.0.11",
"version": "0.0.12",
"description": "",
"main": "./lib/main.js",
"typings": "./lib/typings/main.d.ts",
Expand All @@ -24,11 +24,11 @@
"url": "git@github.com:albertleigh/monaco-imposture-tools.git"
},
"dependencies": {
"@monaco-imposture-tools/oniguruma-asm": "^0.0.11",
"@monaco-imposture-tools/oniguruma-asm": "^0.0.12",
"fast-plist": "^0.1.2"
},
"devDependencies": {
"@monaco-imposture-tools/grammars": "^0.0.11",
"@monaco-imposture-tools/grammars": "^0.0.12",
"@types/chai": "^4.2.21",
"@types/mocha": "^9.0.0",
"@types/node": "^14.14.31",
Expand Down
2 changes: 1 addition & 1 deletion packages/grammars/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@monaco-imposture-tools/grammars",
"version": "0.0.11",
"version": "0.0.12",
"description": "Textmate grammars for monaco imposture tools.",
"main": "index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion packages/onigasm/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/onigasm/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@monaco-imposture-tools/oniguruma-asm",
"version": "0.0.11",
"version": "0.0.12",
"description": "",
"main": "lib/index.js",
"typings": "lib/typings/index.d.ts",
Expand Down

0 comments on commit 2ec6aa6

Please sign in to comment.