diff --git a/dsc/src/subcommand.rs b/dsc/src/subcommand.rs index ea64dce5..6c4e1fa7 100644 --- a/dsc/src/subcommand.rs +++ b/dsc/src/subcommand.rs @@ -49,7 +49,7 @@ pub fn config_get(configurator: &mut Configurator, format: &Option } }, Err(err) => { - error!("Error: {err}"); + error!("{err}"); exit(EXIT_DSC_ERROR); } } diff --git a/dsc/tests/dsc_expressions.tests.ps1 b/dsc/tests/dsc_expressions.tests.ps1 new file mode 100644 index 00000000..1e395f35 --- /dev/null +++ b/dsc/tests/dsc_expressions.tests.ps1 @@ -0,0 +1,66 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. + +Describe 'Expressions tests' { + It 'Accessors work: ' -TestCases @( + @{ text = "[parameters('test').hello]"; expected = '@{world=there}' } + @{ text = "[parameters('test').hello.world]"; expected = 'there' } + @{ text = "[parameters('test').array[0]]"; expected = 'one' } + @{ text = "[parameters('test').array[1][1]]"; expected = 'three' } + @{ text = "[parameters('test').objectArray[0].name]"; expected = 'one' } + @{ text = "[parameters('test').objectArray[1].value[0]]"; expected = '2' } + @{ text = "[parameters('test').objectArray[1].value[1].name]"; expected = 'three' } + ) { + param($text, $expected) + $yaml = @" +`$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json +parameters: + test: + type: object + defaultValue: + hello: + world: there + array: + - one + - [ 'two', 'three' ] + objectArray: + - name: one + value: 1 + - name: two + value: + - 2 + - nestedObject: + name: three + value: 3 +resources: +- name: echo + type: Test/Echo + properties: + output: "$text" +"@ + $debug = $yaml | dsc -l debug config get -f yaml 2>&1 | Out-String + $out = $yaml | dsc config get | ConvertFrom-Json + $LASTEXITCODE | Should -Be 0 + $out.results[0].result.actualState.output | Should -Be $expected -Because $debug + } + + It 'Invalid expressions: ' -TestCases @( + @{ expression = "[concat('A','B')].hello" } + @{ expression = "[concat('A','B')](0)" } + @{ expression = "[concat('a','b').hello]" } + @{ expression = "[concat('a','b')[0]]" } + ) { + param($expression) + $yaml = @" +`$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json +resources: +- name: echo + type: Test/Echo + properties: + output: "$expression" +"@ + $out = dsc config get -d $yaml 2>&1 + $LASTEXITCODE | Should -Be 2 + $out | Should -BeLike "*ERROR*" + } +} diff --git a/dsc_lib/src/parser/expressions.rs b/dsc_lib/src/parser/expressions.rs index b16cc059..6fb4a477 100644 --- a/dsc_lib/src/parser/expressions.rs +++ b/dsc_lib/src/parser/expressions.rs @@ -10,10 +10,16 @@ use crate::dscerror::DscError; use crate::functions::FunctionDispatcher; use crate::parser::functions::Function; +#[derive(Clone)] +pub enum Accessor { + Member(String), + Index(Value), +} + #[derive(Clone)] pub struct Expression { function: Function, - member_access: Option>, + accessors: Vec, } impl Expression { @@ -32,64 +38,115 @@ impl Expression { let Some(function) = expression.child_by_field_name("function") else { return Err(DscError::Parser("Function node not found".to_string())); }; + debug!("Parsing function '{:?}'", function); let function = Function::new(statement_bytes, &function)?; - let member_access = if let Some(members) = expression.child_by_field_name("members") { - if members.is_error() { - return Err(DscError::Parser("Error parsing dot-notation".to_string())); + let mut accessors = Vec::::new(); + if let Some(accessor) = expression.child_by_field_name("accessor") { + debug!("Parsing accessor '{:?}'", accessor); + if accessor.is_error() { + return Err(DscError::Parser("Error parsing accessor".to_string())); } - let mut result = vec![]; - let mut cursor = members.walk(); - for member in members.named_children(&mut cursor) { - if member.is_error() { - return Err(DscError::Parser("Error parsing dot-notation member".to_string())); + let mut cursor = accessor.walk(); + for accessor in accessor.named_children(&mut cursor) { + if accessor.is_error() { + return Err(DscError::Parser("Error parsing accessor".to_string())); } - let value = member.utf8_text(statement_bytes)?; - result.push(value.to_string()); + let accessor_kind = accessor.kind(); + let value = match accessor_kind { + "memberAccess" => { + debug!("Parsing member accessor '{:?}'", accessor); + let Some(member_name) = accessor.child_by_field_name("name") else { + return Err(DscError::Parser("Member name not found".to_string())); + }; + let member = member_name.utf8_text(statement_bytes)?; + Accessor::Member(member.to_string()) + }, + "index" => { + debug!("Parsing index accessor '{:?}'", accessor); + let Some(index_value) = accessor.child_by_field_name("indexValue") else { + return Err(DscError::Parser("Index value not found".to_string())); + }; + match index_value.kind() { + "number" => { + let value = index_value.utf8_text(statement_bytes)?; + let value = serde_json::from_str(value)?; + Accessor::Index(value) + }, + "expression" => { + return Err(DscError::Parser("Expression index not supported".to_string())); + }, + _ => { + return Err(DscError::Parser(format!("Invalid accessor kind: '{accessor_kind}'"))); + }, + } + }, + _ => { + return Err(DscError::Parser(format!("Invalid accessor kind: '{accessor_kind}'"))); + }, + }; + accessors.push(value); } - Some(result) } - else { - None - }; + Ok(Expression { function, - member_access, + accessors, }) } /// Invoke the expression. /// + /// # Arguments + /// + /// * `function_dispatcher` - The function dispatcher to use. + /// * `context` - The context to use. + /// + /// # Returns + /// + /// The result of the expression. + /// /// # Errors /// /// This function will return an error if the expression fails to execute. pub fn invoke(&self, function_dispatcher: &FunctionDispatcher, context: &Context) -> Result { let result = self.function.invoke(function_dispatcher, context)?; trace!("Function result: '{:?}'", result); - if let Some(member_access) = &self.member_access { - debug!("Evaluating member access '{:?}'", member_access); - if !result.is_object() { - return Err(DscError::Parser("Member access on non-object value".to_string())); - } - + if self.accessors.is_empty() { + Ok(result) + } + else { + debug!("Evaluating accessors"); let mut value = result; - for member in member_access { - if !value.is_object() { - return Err(DscError::Parser(format!("Member access '{member}' on non-object value"))); - } - - if let Some(object) = value.as_object() { - if !object.contains_key(member) { - return Err(DscError::Parser(format!("Member '{member}' not found"))); - } - - value = object[member].clone(); + for accessor in &self.accessors { + match accessor { + Accessor::Member(member) => { + if let Some(object) = value.as_object() { + if !object.contains_key(member) { + return Err(DscError::Parser(format!("Member '{member}' not found"))); + } + value = object[member].clone(); + } else { + return Err(DscError::Parser("Member access on non-object value".to_string())); + } + }, + Accessor::Index(index) => { + if let Some(array) = value.as_array() { + let Some(index) = index.as_u64() else { + return Err(DscError::Parser("Index is not a valid number".to_string())); + }; + let index = usize::try_from(index)?; + if index >= array.len() { + return Err(DscError::Parser("Index out of bounds".to_string())); + } + value = array[index].clone(); + } else { + return Err(DscError::Parser("Index access on non-array value".to_string())); + } + }, } } Ok(value) } - else { - Ok(result) - } } } diff --git a/dsc_lib/src/parser/mod.rs b/dsc_lib/src/parser/mod.rs index d88540ab..69a10808 100644 --- a/dsc_lib/src/parser/mod.rs +++ b/dsc_lib/src/parser/mod.rs @@ -52,43 +52,45 @@ impl Statement { if root_node.is_error() { return Err(DscError::Parser(format!("Error parsing statement root: {statement}"))); } - let root_node_kind = root_node.kind(); - if root_node_kind != "statement" { + if root_node.kind() != "statement" { return Err(DscError::Parser(format!("Invalid statement: {statement}"))); } - let Some(child_node) = root_node.named_child(0) else { - return Err(DscError::Parser("Child node not found".to_string())); - }; - if child_node.is_error() { - return Err(DscError::Parser("Error parsing statement child".to_string())); - } - let kind = child_node.kind(); let statement_bytes = statement.as_bytes(); - match kind { - "stringLiteral" | "bracketInStringLiteral" => { - let Ok(value) = child_node.utf8_text(statement_bytes) else { - return Err(DscError::Parser("Error parsing string literal".to_string())); - }; - debug!("Parsing string literal: {0}", value.to_string()); - Ok(Value::String(value.to_string())) - }, - "escapedStringLiteral" => { - // need to remove the first character: [[ => [ - let Ok(value) = child_node.utf8_text(statement_bytes) else { - return Err(DscError::Parser("Error parsing escaped string literal".to_string())); - }; - debug!("Parsing escaped string literal: {0}", value[1..].to_string()); - Ok(Value::String(value[1..].to_string())) - }, - "expression" => { - debug!("Parsing expression"); - let expression = Expression::new(statement_bytes, &child_node)?; - Ok(expression.invoke(&self.function_dispatcher, context)?) - }, - _ => { - Err(DscError::Parser(format!("Unknown expression type {0}", child_node.kind()))) + let mut cursor = root_node.walk(); + let mut return_value = Value::Null; + for child_node in root_node.named_children(&mut cursor) { + if child_node.is_error() { + return Err(DscError::Parser(format!("Error parsing statement: {statement}"))); + } + + match child_node.kind() { + "stringLiteral" => { + let Ok(value) = child_node.utf8_text(statement_bytes) else { + return Err(DscError::Parser("Error parsing string literal".to_string())); + }; + debug!("Parsing string literal: {0}", value.to_string()); + return_value = Value::String(value.to_string()); + }, + "escapedStringLiteral" => { + // need to remove the first character: [[ => [ + let Ok(value) = child_node.utf8_text(statement_bytes) else { + return Err(DscError::Parser("Error parsing escaped string literal".to_string())); + }; + debug!("Parsing escaped string literal: {0}", value[1..].to_string()); + return_value = Value::String(value[1..].to_string()); + }, + "expression" => { + debug!("Parsing expression"); + let expression = Expression::new(statement_bytes, &child_node)?; + return_value = expression.invoke(&self.function_dispatcher, context)?; + }, + _ => { + return Err(DscError::Parser(format!("Unknown expression type {0}", child_node.kind()))); + } } } + + Ok(return_value) } } @@ -113,8 +115,8 @@ mod tests { #[test] fn bracket_in_string() { let mut parser = Statement::new().unwrap(); - let result = parser.parse_and_execute("[this] is a string", &Context::new()).unwrap(); - assert_eq!(result, "[this] is a string"); + let result = parser.parse_and_execute("[this] is a string", &Context::new()); + assert!(result.is_err()); } #[test] diff --git a/tree-sitter-dscexpression/.npmrc b/tree-sitter-dscexpression/.npmrc index 9da1af64..3a65acc5 100644 --- a/tree-sitter-dscexpression/.npmrc +++ b/tree-sitter-dscexpression/.npmrc @@ -1,3 +1,7 @@ +; We generally want to save install/update commands +save=true +; We use a public Azure Artifacts mirror registry=https://pkgs.dev.azure.com/powershell/PowerShell/_packaging/powershell/npm/registry/ - always-auth=true +; But we don't want references to it in the lockfile +omit-lockfile-registry-resolved=true diff --git a/tree-sitter-dscexpression/build.ps1 b/tree-sitter-dscexpression/build.ps1 index dec08464..40b6c7a0 100644 --- a/tree-sitter-dscexpression/build.ps1 +++ b/tree-sitter-dscexpression/build.ps1 @@ -1,7 +1,9 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. -# check if tools are installed +param( + [switch]$UpdatePackages +) function Invoke-NativeCommand($cmd) { Invoke-Expression $cmd @@ -10,6 +12,8 @@ function Invoke-NativeCommand($cmd) { } } +$env:TREE_SITTER_VERBOSE=1 + if ($null -eq (Get-Command npm -ErrorAction Ignore)) { Write-Host 'Installing Node' @@ -30,5 +34,18 @@ if ($LASTEXITCODE -ne 0) { npm ci tree-sitter-cli --omit=optional } -Invoke-NativeCommand 'npx tree-sitter generate' +if ($UpdatePackages) { + if (!$IsWindows) { + throw "This switch only works on Windows" + } + + rm ./package-lock.json + rm -r ./node_modules + npm cache clean --force + npm logout + vsts-npm-auth -config .npmrc -F -V + npm install --force --verbose +} + +Invoke-NativeCommand 'npx tree-sitter generate --build' Invoke-NativeCommand 'npx tree-sitter test' diff --git a/tree-sitter-dscexpression/corpus/valid_expressions.txt b/tree-sitter-dscexpression/corpus/valid_expressions.txt deleted file mode 100644 index 7d8968ca..00000000 --- a/tree-sitter-dscexpression/corpus/valid_expressions.txt +++ /dev/null @@ -1,116 +0,0 @@ -===== -Function no args -===== -[function1()] ---- - - (statement - (expression - (function - (functionName)))) - -===== -Simple expression -===== -[myFunction('argString')] ---- - - (statement - (expression - (function - (functionName) - (arguments - (string))))) - -===== -Multiple arguments -===== -[myFunction('argString', 1, -1, true)] ---- - - (statement - (expression - (function - (functionName) - (arguments - (string) - (number) - (number) - (boolean))))) - -===== -Nested functions -===== -[function1('argString', function2(1, functionThree('threeString', 3), 2), 'oneString')] ---- - - (statement - (expression - (function - (functionName) - (arguments - (string) - (expression - (function - (functionName) - (arguments - (number) - (expression - (function - (functionName) - (arguments - (string) - (number)))) - (number)))) - (string))))) - -===== -Function with dot-notation -===== -[functionOne('argString').prop1.prop2] ---- - - (statement - (expression - (function - (functionName) - (arguments - (string))) - (memberAccess - (memberName) - (memberName)))) - -===== -Nested dot-notation -===== -[functionOne(functionTwo(2).prop1.prop2).prop3] ---- - - (statement - (expression - (function - (functionName) - (arguments - (expression - (function - (functionName) - (arguments - (number))) - (memberAccess - (memberName) - (memberName))))) - (memberAccess - (memberName)))) - -===== -Quotes float input -===== -[myFunction('1234.5678')] ---- - - (statement - (expression - (function - (functionName) - (arguments - (string))))) diff --git a/tree-sitter-dscexpression/grammar.js b/tree-sitter-dscexpression/grammar.js index 754917b2..e94e17d3 100644 --- a/tree-sitter-dscexpression/grammar.js +++ b/tree-sitter-dscexpression/grammar.js @@ -1,6 +1,5 @@ const PREC = { - ESCAPEDSTRING: 3, - BRACKETINSTRING: 2, + ESCAPEDSTRING: 2, EXPRESSIONSTRING: 1, STRINGLITERAL: -11, } @@ -11,14 +10,12 @@ module.exports = grammar({ rules: { statement: $ => choice( $.escapedStringLiteral, - $.bracketInStringLiteral, $._expressionString, $.stringLiteral, ), escapedStringLiteral: $ => token(prec(PREC.ESCAPEDSTRING, seq('[[', /.*?/))), - bracketInStringLiteral: $ => token(prec(PREC.BRACKETINSTRING, seq('[', /.*?/, ']', /.+?/))), _expressionString: $ => prec(PREC.EXPRESSIONSTRING, seq('[', $.expression, ']')), - expression: $ => seq(field('function', $.function), field('members', optional($.memberAccess))), + expression: $ => seq(field('function', $.function), optional(field('accessor',$.accessor))), stringLiteral: $ => token(prec(PREC.STRINGLITERAL, /[^\[].*?/)), function: $ => seq(field('name', $.functionName), '(', field('args', optional($.arguments)), ')'), @@ -27,13 +24,17 @@ module.exports = grammar({ _argument: $ => choice($.expression, $._quotedString, $.number, $.boolean), _quotedString: $ => seq('\'', $.string, '\''), - // ARM strings do not allow to contain single-quote characters + // ARM strings are allowed to contain single-quote characters string: $ => /[^']*/, number: $ => /-?\d+/, boolean: $ => choice('true', 'false'), - memberAccess: $ => seq('.', $.memberName, repeat(seq('.', $.memberName))), + accessor: $ => repeat1(choice($.memberAccess, $.index)), + + memberAccess: $ => seq('.', field('name', $.memberName)), memberName: $ => /[a-zA-Z0-9_-]+/, + + index: $ => seq('[', field('indexValue', choice($.expression, $.number)), ']'), } }); diff --git a/tree-sitter-dscexpression/package-lock.json b/tree-sitter-dscexpression/package-lock.json index d6e4f97e..3f9105ce 100644 --- a/tree-sitter-dscexpression/package-lock.json +++ b/tree-sitter-dscexpression/package-lock.json @@ -10,7 +10,9 @@ "hasInstallScript": true, "license": "MIT", "dependencies": { + "gyp": "^0.3.0", "node-addon-api": "^7.1.0", + "node-gyp": "^10.2.0", "node-gyp-build": "^4.8.0" }, "devDependencies": { @@ -26,10 +28,118 @@ } } }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "integrity": "sha1-s3Znt7wYHBaHgiWbq0JHT79StVA=", + "license": "ISC", + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@npmcli/agent": { + "version": "2.2.2", + "integrity": "sha1-lnYEkY5i9iCmSMeXVGHJyedPxdU=", + "license": "ISC", + "dependencies": { + "agent-base": "^7.1.0", + "http-proxy-agent": "^7.0.0", + "https-proxy-agent": "^7.0.1", + "lru-cache": "^10.0.1", + "socks-proxy-agent": "^8.0.3" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/@npmcli/fs": { + "version": "3.1.1", + "integrity": "sha1-Wc2qWtypXRNfwA8rtT9XcVdc5yY=", + "license": "ISC", + "dependencies": { + "semver": "^7.3.5" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "integrity": "sha1-p36nQvqyV3UUVDTrHSMoz1ATrDM=", + "license": "MIT", + "optional": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/abbrev": { + "version": "2.0.0", + "integrity": "sha1-z1mCm4tPA/id2idxy382U4KMib8=", + "license": "ISC", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/agent-base": { + "version": "7.1.1", + "integrity": "sha1-vb3tffsJa3UaKgh+7rlmRyWy4xc=", + "license": "MIT", + "dependencies": { + "debug": "^4.3.4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/aggregate-error": { + "version": "3.1.0", + "integrity": "sha1-kmcP9Q9TWb23o+DUDQ7DDFc3aHo=", + "license": "MIT", + "dependencies": { + "clean-stack": "^2.0.0", + "indent-string": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-regex": { + "version": "6.0.1", + "integrity": "sha1-MYPjj66aZdfLXlOUXNWJfQJgoGo=", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/ansi-styles": { + "version": "6.2.1", + "integrity": "sha1-DmIyDPmcIa//OzASGSVGqsv7BcU=", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "integrity": "sha1-6D46fj8wCzTLnYf2FfoMvzV2kO4=", + "license": "MIT" + }, "node_modules/base64-js": { "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "integrity": "sha1-GxtEAWClv3rUC2UPCVljSBkDkwo=", "dev": true, "funding": [ { @@ -44,23 +154,31 @@ "type": "consulting", "url": "https://feross.org/support" } - ] + ], + "license": "MIT" }, "node_modules/bl": { "version": "4.1.0", - "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", - "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "integrity": "sha1-RRU1JkGCvsL7vIOmKrmM8R2fezo=", "dev": true, + "license": "MIT", "dependencies": { "buffer": "^5.5.0", "inherits": "^2.0.4", "readable-stream": "^3.4.0" } }, + "node_modules/brace-expansion": { + "version": "2.0.1", + "integrity": "sha1-HtxFng8MVISG7Pn8mfIiE2S5oK4=", + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, "node_modules/buffer": { "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "integrity": "sha1-umLnwTEzBTWCGXFghRqPZI6Z7tA=", "dev": true, "funding": [ { @@ -76,45 +194,305 @@ "url": "https://feross.org/support" } ], + "license": "MIT", "dependencies": { "base64-js": "^1.3.1", "ieee754": "^1.1.13" } }, + "node_modules/cacache": { + "version": "18.0.4", + "integrity": "sha1-RgHXV42ttZxmBE4VfQKjMUaC1qU=", + "license": "ISC", + "dependencies": { + "@npmcli/fs": "^3.1.0", + "fs-minipass": "^3.0.0", + "glob": "^10.2.2", + "lru-cache": "^10.0.1", + "minipass": "^7.0.3", + "minipass-collect": "^2.0.1", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "p-map": "^4.0.0", + "ssri": "^10.0.0", + "tar": "^6.1.11", + "unique-filename": "^3.0.0" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, "node_modules/chownr": { + "version": "2.0.0", + "integrity": "sha1-Fb++U9LqtM9w8YqM1o6+Wzyx3s4=", + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/clean-stack": { + "version": "2.2.0", + "integrity": "sha1-7oRy27Ep5yezHooQpCfe6d/kAIs=", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/coa": { + "version": "0.3.9", + "integrity": "sha1-fj0g0wr3C4CGLpXU1JtxUYO+lgQ=", + "optional": true, + "dependencies": { + "q": "~0.8.10" + }, + "engines": { + "node": ">= 0.6.0" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "integrity": "sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM=", + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { "version": "1.1.4", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", - "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", - "dev": true + "integrity": "sha1-wqCah6y95pVD3m9j+jmVyCbFNqI=", + "license": "MIT" + }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "integrity": "sha1-9zqFudXUHQRVUcF34ogtSshXKKY=", + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/cross-spawn/node_modules/isexe": { + "version": "2.0.0", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "license": "ISC" + }, + "node_modules/cross-spawn/node_modules/which": { + "version": "2.0.2", + "integrity": "sha1-fGqN0KY2oDJ+ELWckobu6T8/UbE=", + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/debug": { + "version": "4.3.6", + "integrity": "sha1-KrLDj7r/6/iqlf3+bYhDjHoTxSs=", + "license": "MIT", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "integrity": "sha1-aWzi7Aqg5uqTo5f/zySqeEDIJ8s=", + "license": "MIT" + }, + "node_modules/emoji-regex": { + "version": "9.2.2", + "integrity": "sha1-hAyIA7DYBH9P8M+WMXazLU7z7XI=", + "license": "MIT" + }, + "node_modules/encoding": { + "version": "0.1.13", + "integrity": "sha1-VldK/deR9UqOmyeFwFgqLSYhD6k=", + "license": "MIT", + "optional": true, + "dependencies": { + "iconv-lite": "^0.6.2" + } }, "node_modules/end-of-stream": { "version": "1.4.4", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", - "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "integrity": "sha1-WuZKX0UFe682JuwU2gyl5LJDHrA=", "dev": true, + "license": "MIT", "dependencies": { "once": "^1.4.0" } }, - "node_modules/execspawn": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/execspawn/-/execspawn-1.0.1.tgz", - "integrity": "sha512-s2k06Jy9i8CUkYe0+DxRlvtkZoOkwwfhB+Xxo5HGUtrISVW2m98jO2tr67DGRFxZwkjQqloA3v/tNtjhBRBieg==", - "dev": true, + "node_modules/env-paths": { + "version": "2.2.1", + "integrity": "sha1-QgOZ1BbOH76bwKB8Yvpo1n/Q+PI=", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/err-code": { + "version": "2.0.3", + "integrity": "sha1-I8Lzt1b/38YI0w4nyalBAkgH5/k=", + "license": "MIT" + }, + "node_modules/exponential-backoff": { + "version": "3.1.1", + "integrity": "sha1-ZKx1Jv40GrGKOQFs0ix4fQHgC/Y=", + "license": "Apache-2.0" + }, + "node_modules/foreground-child": { + "version": "3.2.1", + "integrity": "sha1-dnAEzPOlsw3zm+2QcYurQ/4KWfc=", + "license": "ISC", "dependencies": { - "util-extend": "^1.0.1" + "cross-spawn": "^7.0.0", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/fs-constants": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", - "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", - "dev": true + "integrity": "sha1-a+Dem+mYzhavivwkSXue6bfM2a0=", + "dev": true, + "license": "MIT" + }, + "node_modules/fs-minipass": { + "version": "3.0.3", + "integrity": "sha1-eahZgcTcEgBl6W9iCGv2+dwmzFQ=", + "license": "ISC", + "dependencies": { + "minipass": "^7.0.3" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/glob": { + "version": "10.4.5", + "integrity": "sha1-9NnwuQ/9urCcnXf18ptCYlF7CVY=", + "license": "ISC", + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "integrity": "sha1-QYPk6L8Iu24Fu7L30uDI9xLKQOM=", + "license": "ISC" + }, + "node_modules/gyp": { + "version": "0.3.0", + "integrity": "sha1-yru5/vB5YN6BzqRDb6kAF5cDkCo=", + "license": "BSD", + "dependencies": { + "gyp-expansions": "0.0.x", + "gyp-load": "0.0.x", + "gyp-merge": "0.2.x" + } + }, + "node_modules/gyp-expansions": { + "version": "0.0.2", + "integrity": "sha1-5mQhpmpGGg0s84T4cA8X6xR4NnI=", + "license": "BSD", + "optionalDependencies": { + "ometajs": "~3.2.4" + } + }, + "node_modules/gyp-load": { + "version": "0.0.1", + "integrity": "sha1-xBW4qmQ8gELO9jTTZcCOwZQtpEc=", + "license": "BSD", + "dependencies": { + "gyp-merge": "0.2.0" + } + }, + "node_modules/gyp-load/node_modules/gyp-merge": { + "version": "0.2.0", + "integrity": "sha1-vCMJpwTp0E8PLj+0TZsPcvdiKwg=" + }, + "node_modules/gyp-merge": { + "version": "0.2.1", + "integrity": "sha1-0D0S1RKC97mbyoDjBZrKrOpDmYM=" + }, + "node_modules/http-cache-semantics": { + "version": "4.1.1", + "integrity": "sha1-q+AvyymFRgvwMjvmZENuw0dqbVo=", + "license": "BSD-2-Clause" + }, + "node_modules/http-proxy-agent": { + "version": "7.0.2", + "integrity": "sha1-mosfJGhmwChQlIZYX2K48sGMJw4=", + "license": "MIT", + "dependencies": { + "agent-base": "^7.1.0", + "debug": "^4.3.4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/https-proxy-agent": { + "version": "7.0.5", + "integrity": "sha1-notQE4cymeEfq2/VSEBdotbGArI=", + "license": "MIT", + "dependencies": { + "agent-base": "^7.0.2", + "debug": "4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/iconv-lite": { + "version": "0.6.3", + "integrity": "sha1-pS+AvzjaGVLrXGgXkHGYcaGnJQE=", + "license": "MIT", + "optional": true, + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } }, "node_modules/ieee754": { "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "integrity": "sha1-jrehCmP/8l0VpXsAFYbRd9Gw01I=", "dev": true, "funding": [ { @@ -129,46 +507,292 @@ "type": "consulting", "url": "https://feross.org/support" } - ] + ], + "license": "BSD-3-Clause" + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "license": "MIT", + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/indent-string": { + "version": "4.0.0", + "integrity": "sha1-Yk+PRJfWGbLZdoUx1Y9BIoVNclE=", + "license": "MIT", + "engines": { + "node": ">=8" + } }, "node_modules/inherits": { "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true + "integrity": "sha1-D6LGT5MpF8NDOg3tVTY6rjdBa3w=", + "dev": true, + "license": "ISC" + }, + "node_modules/ip-address": { + "version": "9.0.5", + "integrity": "sha1-EXqWCBmwh4DDvR8U7zwcwdPz6lo=", + "license": "MIT", + "dependencies": { + "jsbn": "1.1.0", + "sprintf-js": "^1.1.3" + }, + "engines": { + "node": ">= 12" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "integrity": "sha1-8Rb4Bk/pCz94RKOJl8C3UFEmnx0=", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-lambda": { + "version": "1.0.1", + "integrity": "sha1-PZh3iZ5qU+/AFgUEzeFfgubwYdU=", + "license": "MIT" + }, + "node_modules/isexe": { + "version": "3.1.1", + "integrity": "sha1-SkB+K9eN37FL6gwnxvcHLd53Xw0=", + "license": "ISC", + "engines": { + "node": ">=16" + } + }, + "node_modules/jackspeak": { + "version": "3.4.3", + "integrity": "sha1-iDOp2Jq0rN5hiJQr0cU7Y5DtWoo=", + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, + "node_modules/jsbn": { + "version": "1.1.0", + "integrity": "sha1-sBMHyym2GKHtJux56RH4A8TaAEA=", + "license": "MIT" }, "node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, + "version": "10.4.3", + "integrity": "sha1-QQ/IoXtw5ZgBPfJXwkRrfzOD8Rk=", + "license": "ISC" + }, + "node_modules/make-fetch-happen": { + "version": "13.0.1", + "integrity": "sha1-Jzui949F4fOm3Kkc7eh9n6SCHjY=", + "license": "ISC", "dependencies": { - "yallist": "^4.0.0" + "@npmcli/agent": "^2.0.0", + "cacache": "^18.0.0", + "http-cache-semantics": "^4.1.1", + "is-lambda": "^1.0.1", + "minipass": "^7.0.2", + "minipass-fetch": "^3.0.0", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "negotiator": "^0.6.3", + "proc-log": "^4.2.0", + "promise-retry": "^2.0.1", + "ssri": "^10.0.0" }, "engines": { - "node": ">=10" + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/minimatch": { + "version": "9.0.5", + "integrity": "sha1-10+d1rV9g9jpjPuCEzsDl4vJKeU=", + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/minimist": { "version": "1.2.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", - "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "integrity": "sha1-waRk52kzAuCCoHXO4MBXdBrEdyw=", "dev": true, + "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/minipass": { + "version": "7.1.2", + "integrity": "sha1-k6libOXl5mvU24aEnnUV6SNApwc=", + "license": "ISC", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/minipass-collect": { + "version": "2.0.1", + "integrity": "sha1-FiG8d+EiWKEsYNNOInbsXCBoCGM=", + "license": "ISC", + "dependencies": { + "minipass": "^7.0.3" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/minipass-fetch": { + "version": "3.0.5", + "integrity": "sha1-8Pl+QFgK/8SjXMShNJ8FrjbLHkw=", + "license": "MIT", + "dependencies": { + "minipass": "^7.0.3", + "minipass-sized": "^1.0.3", + "minizlib": "^2.1.2" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + }, + "optionalDependencies": { + "encoding": "^0.1.13" + } + }, + "node_modules/minipass-flush": { + "version": "1.0.5", + "integrity": "sha1-gucTXX6JpQ/+ZGEKeHlTxMTLs3M=", + "license": "ISC", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/minipass-flush/node_modules/minipass": { + "version": "3.3.6", + "integrity": "sha1-e7o4TbOhUg0YycDlJRw0ROld2Uo=", + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-pipeline": { + "version": "1.2.4", + "integrity": "sha1-aEcveXEcCEZXwGfFxq2Tzd6oIUw=", + "license": "ISC", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-pipeline/node_modules/minipass": { + "version": "3.3.6", + "integrity": "sha1-e7o4TbOhUg0YycDlJRw0ROld2Uo=", + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-sized": { + "version": "1.0.3", + "integrity": "sha1-cO5afFBSBwr6z7wil36nne81O3A=", + "license": "ISC", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-sized/node_modules/minipass": { + "version": "3.3.6", + "integrity": "sha1-e7o4TbOhUg0YycDlJRw0ROld2Uo=", + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minizlib": { + "version": "2.1.2", + "integrity": "sha1-6Q00Zrogm5MkUVCKEc49NjIUWTE=", + "license": "MIT", + "dependencies": { + "minipass": "^3.0.0", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/minizlib/node_modules/minipass": { + "version": "3.3.6", + "integrity": "sha1-e7o4TbOhUg0YycDlJRw0ROld2Uo=", + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/mkdirp": { + "version": "1.0.4", + "integrity": "sha1-PrXtYmInVteaXw4qIh3+utdcL34=", + "license": "MIT", + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/mkdirp-classic": { "version": "0.5.3", - "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", - "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==", - "dev": true + "integrity": "sha1-+hDJEVzG2IZb4iG6R+6b7XhgERM=", + "dev": true, + "license": "MIT" + }, + "node_modules/ms": { + "version": "2.1.2", + "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=", + "license": "MIT" + }, + "node_modules/negotiator": { + "version": "0.6.3", + "integrity": "sha1-WOMjpy/twNb5zU0x/kn1FHlZDM0=", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } }, "node_modules/node-abi": { - "version": "3.57.0", - "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.57.0.tgz", - "integrity": "sha512-Dp+A9JWxRaKuHP35H77I4kCKesDy5HUDEmScia2FyncMTOXASMyg251F5PhFoDA5uqBrDDffiLpbqnrZmNXW+g==", + "version": "3.65.0", + "integrity": "sha1-ypLVWTiOHpyrFoChjBoYdXzaydM=", "dev": true, + "license": "MIT", "dependencies": { "semver": "^7.3.5" }, @@ -177,28 +801,62 @@ } }, "node_modules/node-addon-api": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-7.1.0.tgz", - "integrity": "sha512-mNcltoe1R8o7STTegSOHdnJNN7s5EUvhoS7ShnTHDyOSd+8H+UdWODq6qSv67PjC8Zc5JRT8+oLAMCr0SIXw7g==", + "version": "7.1.1", + "integrity": "sha1-Grpmk7DyVSWKBJ1iEykykyKq1Vg=", + "license": "MIT" + }, + "node_modules/node-gyp": { + "version": "10.2.0", + "integrity": "sha1-gBAcSqT3qyJfE/zI2qqsTrGo3YY=", + "license": "MIT", + "dependencies": { + "env-paths": "^2.2.0", + "exponential-backoff": "^3.1.1", + "glob": "^10.3.10", + "graceful-fs": "^4.2.6", + "make-fetch-happen": "^13.0.0", + "nopt": "^7.0.0", + "proc-log": "^4.1.0", + "semver": "^7.3.5", + "tar": "^6.2.1", + "which": "^4.0.0" + }, + "bin": { + "node-gyp": "bin/node-gyp.js" + }, "engines": { - "node": "^16 || ^18 || >= 20" + "node": "^16.14.0 || >=18.0.0" } }, "node_modules/node-gyp-build": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.0.tgz", - "integrity": "sha512-u6fs2AEUljNho3EYTJNBfImO5QTo/J/1Etd+NVdCj7qWKUSN/bSLkZwhDv7I+w/MSC6qJ4cknepkAYykDdK8og==", + "version": "4.8.1", + "integrity": "sha1-l2062QXnG3YIb08LDTY3/nm2zaU=", + "license": "MIT", "bin": { "node-gyp-build": "bin.js", "node-gyp-build-optional": "optional.js", "node-gyp-build-test": "build-test.js" } }, + "node_modules/nopt": { + "version": "7.2.1", + "integrity": "sha1-HKwOq5uOl8kJMzhEbt3UCyyMoec=", + "license": "ISC", + "dependencies": { + "abbrev": "^2.0.0" + }, + "bin": { + "nopt": "bin/nopt.js" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, "node_modules/npm-run-path": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-3.1.0.tgz", - "integrity": "sha512-Dbl4A/VfiVGLgQv29URL9xshU8XDY1GeLy+fsaZ1AA8JDSfjvr5P5+pzRbWqRSBxk6/DW7MIh8lTM/PaGnP2kg==", + "integrity": "sha1-f5G+MX9qRm7+08nymArYpO6LD6U=", "dev": true, + "license": "MIT", "dependencies": { "path-key": "^3.0.0" }, @@ -206,31 +864,79 @@ "node": ">=8" } }, + "node_modules/ometajs": { + "version": "3.2.4", + "integrity": "sha1-gHzfTA6N8XJ/Ikym2x+qxD6L2rE=", + "optional": true, + "dependencies": { + "coa": "0.3.x", + "q": "0.8.x", + "uglify-js": "1.3.x" + }, + "bin": { + "ometajs2js": "bin/ometajs2js" + }, + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/once": { "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "dev": true, + "license": "ISC", "dependencies": { "wrappy": "1" } }, + "node_modules/p-map": { + "version": "4.0.0", + "integrity": "sha1-uy+Vpe2i7BaOySdOBqdHw+KQTSs=", + "license": "MIT", + "dependencies": { + "aggregate-error": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/package-json-from-dist": { + "version": "1.0.0", + "integrity": "sha1-5QHNMJSyeEletCWNTJ9tWsMBnwA=", + "license": "BlueOak-1.0.0" + }, "node_modules/path-key": { "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true, + "integrity": "sha1-WB9q3mWMu6ZaDTOA3ndTKVBU83U=", + "license": "MIT", "engines": { "node": ">=8" } }, + "node_modules/path-scurry": { + "version": "1.11.1", + "integrity": "sha1-eWCmaIiFlKByCxKpEdGnQqufEdI=", + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/prebuildify": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/prebuildify/-/prebuildify-6.0.0.tgz", - "integrity": "sha512-DEvK4C3tcimIp7Pzqbs036n9i6CTKGp1XVEpMnr4wV3enKU5sBogPP+lP3KZw7993i42bXnsd5eIxAXQ566Cqw==", + "version": "6.0.1", + "integrity": "sha1-ZVdG+R/JW2hhBhWJhnhTbdMDzQM=", "dev": true, + "license": "MIT", "dependencies": { - "execspawn": "^1.0.1", "minimist": "^1.2.5", "mkdirp-classic": "^0.5.3", "node-abi": "^3.3.0", @@ -242,21 +948,50 @@ "prebuildify": "bin.js" } }, + "node_modules/proc-log": { + "version": "4.2.0", + "integrity": "sha1-tvRh5AJudf3+IosmXp96AHedcDQ=", + "license": "ISC", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/promise-retry": { + "version": "2.0.1", + "integrity": "sha1-/3R6E2IKtXumiPX8Z4VUEMNw2iI=", + "license": "MIT", + "dependencies": { + "err-code": "^2.0.2", + "retry": "^0.12.0" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/pump": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "integrity": "sha1-tKIRaBW94vTh6mAjVOjHVWUQemQ=", "dev": true, + "license": "MIT", "dependencies": { "end-of-stream": "^1.1.0", "once": "^1.3.1" } }, + "node_modules/q": { + "version": "0.8.12", + "integrity": "sha1-kWKpHhGBnEvNp9oVz1/vqtB3iCM=", + "optional": true, + "engines": { + "node": ">=0.6.0", + "teleport": ">=0.2.0" + } + }, "node_modules/readable-stream": { "version": "3.6.2", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", - "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "integrity": "sha1-VqmzbqllwAxak+8x6xEaDxEFaWc=", "dev": true, + "license": "MIT", "dependencies": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", @@ -266,10 +1001,17 @@ "node": ">= 6" } }, + "node_modules/retry": { + "version": "0.12.0", + "integrity": "sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs=", + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, "node_modules/safe-buffer": { "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "integrity": "sha1-Hq+fqb2x/dTsdfWPnNtOa3gn7sY=", "dev": true, "funding": [ { @@ -284,16 +1026,19 @@ "type": "consulting", "url": "https://feross.org/support" } - ] + ], + "license": "MIT" + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "integrity": "sha1-RPoWGwGHuVSd2Eu5GAL5vYOFzWo=", + "license": "MIT", + "optional": true }, "node_modules/semver": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", - "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", - "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, + "version": "7.6.3", + "integrity": "sha1-mA97VVC8F1+03AlAMIVif56zMUM=", + "license": "ISC", "bin": { "semver": "bin/semver.js" }, @@ -301,20 +1046,205 @@ "node": ">=10" } }, + "node_modules/shebang-command": { + "version": "2.0.0", + "integrity": "sha1-zNCvT4g1+9wmW4JGGq8MNmY/NOo=", + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "integrity": "sha1-rhbxZE2HPsrYQ7AwexQzYtTEIXI=", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/signal-exit": { + "version": "4.1.0", + "integrity": "sha1-lSGIwcvVRgcOLdIND0HArgUwywQ=", + "license": "ISC", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/smart-buffer": { + "version": "4.2.0", + "integrity": "sha1-bh1x+k8YwF99D/IW3RakgdDo2a4=", + "license": "MIT", + "engines": { + "node": ">= 6.0.0", + "npm": ">= 3.0.0" + } + }, + "node_modules/socks": { + "version": "2.8.3", + "integrity": "sha1-Hr0PCcUrqVoJdQr+Pz+fckqADLU=", + "license": "MIT", + "dependencies": { + "ip-address": "^9.0.5", + "smart-buffer": "^4.2.0" + }, + "engines": { + "node": ">= 10.0.0", + "npm": ">= 3.0.0" + } + }, + "node_modules/socks-proxy-agent": { + "version": "8.0.4", + "integrity": "sha1-kHHcoXr5X0gzADFvSwY1ePoNsIw=", + "license": "MIT", + "dependencies": { + "agent-base": "^7.1.1", + "debug": "^4.3.4", + "socks": "^2.8.3" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/sprintf-js": { + "version": "1.1.3", + "integrity": "sha1-SRS5A6L4toXRf994pw6RfocuREo=", + "license": "BSD-3-Clause" + }, + "node_modules/ssri": { + "version": "10.0.6", + "integrity": "sha1-qKreLeYLorzoaI4/o0m60Fx9weU=", + "license": "ISC", + "dependencies": { + "minipass": "^7.0.3" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, "node_modules/string_decoder": { "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "integrity": "sha1-QvEUWUpGzxqOMLCoT1bHjD7awh4=", "dev": true, + "license": "MIT", "dependencies": { "safe-buffer": "~5.2.0" } }, + "node_modules/string-width": { + "version": "5.1.2", + "integrity": "sha1-FPja7G2B5yIdKjV+Zoyrc728p5Q=", + "license": "MIT", + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "integrity": "sha1-JpxxF9J7Ba0uU2gwqOyJXvnG0BA=", + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "integrity": "sha1-CCyyyJyf6GWaMRpTvWpNxTAdswQ=", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "integrity": "sha1-6Bj9ac5cz8tARZT4QpY79TFkzDc=", + "license": "MIT" + }, + "node_modules/string-width-cjs/node_modules/strip-ansi": { + "version": "6.0.1", + "integrity": "sha1-nibGPTD1NEPpSJSVshBdN7Z6hdk=", + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "7.1.0", + "integrity": "sha1-1bZWjKaJ2FYTcLBwdoXSJDT6/0U=", + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "integrity": "sha1-nibGPTD1NEPpSJSVshBdN7Z6hdk=", + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "integrity": "sha1-CCyyyJyf6GWaMRpTvWpNxTAdswQ=", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/tar": { + "version": "6.2.1", + "integrity": "sha1-cXVJxUG8PCrxV1G+qUsd0GjUsDo=", + "license": "ISC", + "dependencies": { + "chownr": "^2.0.0", + "fs-minipass": "^2.0.0", + "minipass": "^5.0.0", + "minizlib": "^2.1.1", + "mkdirp": "^1.0.3", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/tar-fs": { "version": "2.1.1", - "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", - "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==", + "integrity": "sha1-SJoVq4Xx8L76uzcLfeT561y+h4Q=", "dev": true, + "license": "MIT", "dependencies": { "chownr": "^1.1.1", "mkdirp-classic": "^0.5.2", @@ -322,11 +1252,17 @@ "tar-stream": "^2.1.4" } }, + "node_modules/tar-fs/node_modules/chownr": { + "version": "1.1.4", + "integrity": "sha1-b8nXtC0ypYNZYzdmbn0ICE2izGs=", + "dev": true, + "license": "ISC" + }, "node_modules/tar-stream": { "version": "2.2.0", - "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", - "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", + "integrity": "sha1-rK2EwoQTawYNw/qmRHSqmuvXcoc=", "dev": true, + "license": "MIT", "dependencies": { "bl": "^4.0.3", "end-of-stream": "^1.4.1", @@ -338,59 +1274,190 @@ "node": ">=6" } }, - "node_modules/tree-sitter": { - "version": "0.21.1", - "resolved": "https://registry.npmjs.org/tree-sitter/-/tree-sitter-0.21.1.tgz", - "integrity": "sha512-7dxoA6kYvtgWw80265MyqJlkRl4yawIjO7S5MigytjELkX43fV2WsAXzsNfO7sBpPPCF5Gp0+XzHk0DwLCq3xQ==", - "hasInstallScript": true, - "peer": true, + "node_modules/tar/node_modules/fs-minipass": { + "version": "2.1.0", + "integrity": "sha1-f1A2/b8SxjwWkZDL5BmchSJx+fs=", + "license": "ISC", "dependencies": { - "node-addon-api": "^8.0.0", - "node-gyp-build": "^4.8.0" + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/tar/node_modules/fs-minipass/node_modules/minipass": { + "version": "3.3.6", + "integrity": "sha1-e7o4TbOhUg0YycDlJRw0ROld2Uo=", + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/tar/node_modules/minipass": { + "version": "5.0.0", + "integrity": "sha1-PpeI/7kLaUpdDslEeaRbXYc4Ez0=", + "license": "ISC", + "engines": { + "node": ">=8" } }, "node_modules/tree-sitter-cli": { - "version": "0.22.2", - "resolved": "https://registry.npmjs.org/tree-sitter-cli/-/tree-sitter-cli-0.22.2.tgz", - "integrity": "sha512-ecqccEp27XMFXgjLMEEU71vK9JCWAC7fqSTTxcs5P1tnEnaaf4GkHz/wfo4lJ9l3rfxcTDPxN84tHAoitIQqdA==", + "version": "0.22.6", + "integrity": "sha1-8FQrzkCVlSwpLT8DANcq6rRCt2U=", "dev": true, "hasInstallScript": true, + "license": "MIT", "bin": { "tree-sitter": "cli.js" } }, - "node_modules/tree-sitter/node_modules/node-addon-api": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-8.0.0.tgz", - "integrity": "sha512-ipO7rsHEBqa9STO5C5T10fj732ml+5kLN1cAG8/jdHd56ldQeGj3Q7+scUS+VHK/qy1zLEwC4wMK5+yM0btPvw==", - "peer": true, + "node_modules/uglify-js": { + "version": "1.3.5", + "integrity": "sha1-S1v/+Rhu/7qoiOTJ6UvZ/EyUkp0=", + "optional": true, + "bin": { + "uglifyjs": "bin/uglifyjs" + } + }, + "node_modules/unique-filename": { + "version": "3.0.0", + "integrity": "sha1-SLp6WhaEn1CA0mx2DIbPXPBXcOo=", + "license": "ISC", + "dependencies": { + "unique-slug": "^4.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/unique-slug": { + "version": "4.0.0", + "integrity": "sha1-a65rsWvpE1G63STNznQfiSplMuM=", + "license": "ISC", + "dependencies": { + "imurmurhash": "^0.1.4" + }, "engines": { - "node": "^18 || ^20 || >= 21" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/util-deprecate": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", - "dev": true + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true, + "license": "MIT" }, - "node_modules/util-extend": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/util-extend/-/util-extend-1.0.3.tgz", - "integrity": "sha512-mLs5zAK+ctllYBj+iAQvlDCwoxU/WDOUaJkcFudeiAX6OajC6BKXJUa9a+tbtkC11dz2Ufb7h0lyvIOVn4LADA==", - "dev": true + "node_modules/which": { + "version": "4.0.0", + "integrity": "sha1-zWC150UDo/vPv2zWtBOKi65kTBo=", + "license": "ISC", + "dependencies": { + "isexe": "^3.1.1" + }, + "bin": { + "node-which": "bin/which.js" + }, + "engines": { + "node": "^16.13.0 || >=18.0.0" + } + }, + "node_modules/wrap-ansi": { + "version": "8.1.0", + "integrity": "sha1-VtwiNo7lcPrOG0mBmXXZuaXq0hQ=", + "license": "MIT", + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "integrity": "sha1-Z+FFz/UQpqaYS98RUpEdadLrnkM=", + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "integrity": "sha1-CCyyyJyf6GWaMRpTvWpNxTAdswQ=", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/ansi-styles": { + "version": "4.3.0", + "integrity": "sha1-7dgDYornHATIWuegkG7a00tkiTc=", + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "integrity": "sha1-6Bj9ac5cz8tARZT4QpY79TFkzDc=", + "license": "MIT" + }, + "node_modules/wrap-ansi-cjs/node_modules/string-width": { + "version": "4.2.3", + "integrity": "sha1-JpxxF9J7Ba0uU2gwqOyJXvnG0BA=", + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/strip-ansi": { + "version": "6.0.1", + "integrity": "sha1-nibGPTD1NEPpSJSVshBdN7Z6hdk=", + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } }, "node_modules/wrappy": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "dev": true + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true, + "license": "ISC" }, "node_modules/yallist": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true + "integrity": "sha1-m7knkNnA7/7GO+c1GeEaNQGaOnI=", + "license": "ISC" } } } diff --git a/tree-sitter-dscexpression/package.json b/tree-sitter-dscexpression/package.json index 35f0aa94..1cbfc846 100644 --- a/tree-sitter-dscexpression/package.json +++ b/tree-sitter-dscexpression/package.json @@ -21,8 +21,10 @@ "src/**" ], "dependencies": { + "gyp": "^0.3.0", + "node-gyp-build": "^4.8.0", "node-addon-api": "^7.1.0", - "node-gyp-build": "^4.8.0" + "node-gyp": "^10.2.0" }, "devDependencies": { "prebuildify": "^6.0.0", diff --git a/tree-sitter-dscexpression/corpus/invalid_expressions.txt b/tree-sitter-dscexpression/test/corpus/invalid_expressions.txt similarity index 77% rename from tree-sitter-dscexpression/corpus/invalid_expressions.txt rename to tree-sitter-dscexpression/test/corpus/invalid_expressions.txt index 2914a066..3e3ec5da 100644 --- a/tree-sitter-dscexpression/corpus/invalid_expressions.txt +++ b/tree-sitter-dscexpression/test/corpus/invalid_expressions.txt @@ -78,8 +78,10 @@ String starting with bracket [Test] string --- - (statement - (bracketInStringLiteral)) + (ERROR + (ERROR + (memberName)) + (functionName)) ===== Multiple expressions @@ -88,16 +90,13 @@ Multiple expressions --- (statement - (bracketInStringLiteral)) - -===== -Whitespace -===== - [ functionOne ( 'arg' , 2 ) ] ---- - - (statement - (stringLiteral)) + (ERROR + (expression + (function + (functionName)))) + (expression + (function + (functionName)))) ===== Incomplete expression @@ -169,3 +168,33 @@ Float input starting with decimal (ERROR) (arguments (number))))) + +===== +Expression with member accessor outside +===== +[myFunction(1)].accessor +--- + + (statement + (expression + (function + (functionName) + (arguments + (number)))) + (ERROR + (functionName))) + +===== +Expression with index accessor outside +===== +[myFunction(1)][0] +--- + + (statement + (expression + (function + (functionName) + (arguments + (number)))) + (ERROR + (number))) diff --git a/tree-sitter-dscexpression/test/corpus/valid_expressions.txt b/tree-sitter-dscexpression/test/corpus/valid_expressions.txt new file mode 100644 index 00000000..7e23d684 --- /dev/null +++ b/tree-sitter-dscexpression/test/corpus/valid_expressions.txt @@ -0,0 +1,276 @@ +===== +Function no args +===== +[function1()] +--- + +(statement + (expression + (function + (functionName)))) + +===== +String containing brackets +===== +Hello [world] +--- + +(statement + (stringLiteral)) + +===== +Simple expression +===== +[myFunction('argString')] +--- + +(statement + (expression + (function + (functionName) + (arguments + (string))))) + +===== +Multiple arguments +===== +[myFunction('argString', 1, -1, true)] +--- + +(statement + (expression + (function + (functionName) + (arguments + (string) + (number) + (number) + (boolean))))) + +===== +Nested functions +===== +[function1('argString', function2(1, functionThree('threeString', 3), 2), 'oneString')] +--- + +(statement + (expression + (function + (functionName) + (arguments + (string) + (expression + (function + (functionName) + (arguments + (number) + (expression + (function + (functionName) + (arguments + (string) + (number)))) + (number)))) + (string))))) + +===== +Whitespace +===== + [ functionOne ( 'arg' , 2 ) ] +--- + +(statement + (expression + (function + (functionName) + (arguments + (string) + (number))))) + +===== +Function with dot-notation +===== +[functionOne('argString').prop1.prop2] +--- + +(statement + (expression + (function + (functionName) + (arguments + (string))) + (accessor + (memberAccess + (memberName)) + (memberAccess + (memberName))))) + +===== +Nested dot-notation +===== +[functionOne(functionTwo(2).prop1.prop2).prop3] +--- + +(statement + (expression + (function + (functionName) + (arguments + (expression + (function + (functionName) + (arguments + (number))) + (accessor + (memberAccess + (memberName)) + (memberAccess + (memberName)))))) + (accessor + (memberAccess + (memberName))))) + +===== +Quotes float input +===== +[myFunction('1234.5678')] +--- + +(statement + (expression + (function + (functionName) + (arguments + (string))))) + +===== +Array index +===== +[myFunction('argString')[0]] +--- + +(statement + (expression + (function + (functionName) + (arguments + (string))) + (accessor + (index + (number))))) + +===== +Multiple array indexes +===== +[myFunction('argString')[0][1][2]] +--- + +(statement + (expression + (function + (functionName) + (arguments + (string))) + (accessor + (index + (number)) + (index + (number)) + (index + (number))))) + +===== +Array index with function +===== +[myFunction('argString')[myFunction2(1)]] +--- + +(statement + (expression + (function + (functionName) + (arguments + (string))) + (accessor + (index + (expression + (function + (functionName) + (arguments + (number)))))))) + +===== +Array index with function and dot-notation +===== +[myFunction('argString')[myFunction2(1)].prop1] +--- + +(statement + (expression + (function + (functionName) + (arguments + (string))) + (accessor + (index + (expression + (function + (functionName) + (arguments + (number))))) + (memberAccess + (memberName))))) + +===== +Array index with function and nested dot-notation +===== +[myFunction('argString')[myFunction2(1).prop1.prop2].prop3] +--- + +(statement + (expression + (function + (functionName) + (arguments + (string))) + (accessor + (index + (expression + (function + (functionName) + (arguments + (number))) + (accessor + (memberAccess + (memberName)) + (memberAccess + (memberName))))) + (memberAccess + (memberName))))) + +===== +Array index with function and nested dot-notation with index +===== +[myFunction('argString')[myFunction2(1).prop1.prop2][0]] +--- + +(statement + (expression + (function + (functionName) + (arguments + (string))) + (accessor + (index + (expression + (function + (functionName) + (arguments + (number))) + (accessor + (memberAccess + (memberName)) + (memberAccess + (memberName))))) + (index + (number)))))