Initial revision
This commit is contained in:
commit
bb4c5973e6
11
.gitignore
vendored
Normal file
11
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
binding.gyp
|
||||||
|
Cargo.toml
|
||||||
|
node_modules/
|
||||||
|
src/grammar.json
|
||||||
|
src/node-types.json
|
||||||
|
src/parser.c
|
||||||
|
src/tree_sitter/parser.h
|
||||||
|
bindings/node/binding.cc
|
||||||
|
bindings/node/index.js
|
||||||
|
bindings/rust/build.rs
|
||||||
|
bindings/rust/lib.rs
|
||||||
8
README.txt
Normal file
8
README.txt
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
Tree-Sitter parser for Ada
|
||||||
|
|
||||||
|
|
||||||
|
Use:
|
||||||
|
|
||||||
|
npm install
|
||||||
|
npm run test
|
||||||
|
|
||||||
81
corpus/packages.txt
Normal file
81
corpus/packages.txt
Normal file
|
|
@ -0,0 +1,81 @@
|
||||||
|
================================================================================
|
||||||
|
packages
|
||||||
|
================================================================================
|
||||||
|
|
||||||
|
with Ada.Text_IO;
|
||||||
|
package P1 is
|
||||||
|
package Nested is
|
||||||
|
end Nested;
|
||||||
|
end P1;
|
||||||
|
|
||||||
|
PriVaTe PACKAGE P2 is -- comment to be ignored
|
||||||
|
private
|
||||||
|
end;
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
(compilation
|
||||||
|
(compilation_unit
|
||||||
|
(with_clause
|
||||||
|
(name_list
|
||||||
|
(name
|
||||||
|
(selected_component
|
||||||
|
(name
|
||||||
|
(direct_name
|
||||||
|
(identifier)))
|
||||||
|
(selector_name
|
||||||
|
(direct_name
|
||||||
|
(identifier))))))))
|
||||||
|
(compilation_unit
|
||||||
|
(package_specification
|
||||||
|
(identifier)
|
||||||
|
(package_specification
|
||||||
|
(identifier)
|
||||||
|
(identifier))
|
||||||
|
(identifier)))
|
||||||
|
(compilation_unit
|
||||||
|
(package_specification
|
||||||
|
(identifier)
|
||||||
|
(comment))))
|
||||||
|
|
||||||
|
================================================================================
|
||||||
|
Types
|
||||||
|
================================================================================
|
||||||
|
|
||||||
|
package P is
|
||||||
|
type A is range 1 .. 2;
|
||||||
|
type B is new Integer;
|
||||||
|
end P;
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
(compilation
|
||||||
|
(compilation_unit
|
||||||
|
(package_specification
|
||||||
|
(identifier)
|
||||||
|
(type_declaration
|
||||||
|
(full_type_declaration
|
||||||
|
(identifier)
|
||||||
|
(type_definition
|
||||||
|
(integer_type_definition
|
||||||
|
(signed_integer_type_definition
|
||||||
|
(simple_expression
|
||||||
|
(term
|
||||||
|
(factor
|
||||||
|
(primary
|
||||||
|
(numeric_literal)))))
|
||||||
|
(simple_expression
|
||||||
|
(term
|
||||||
|
(factor
|
||||||
|
(primary
|
||||||
|
(numeric_literal))))))))))
|
||||||
|
(type_declaration
|
||||||
|
(full_type_declaration
|
||||||
|
(identifier)
|
||||||
|
(type_definition
|
||||||
|
(derived_type_definition
|
||||||
|
(subtype_indication
|
||||||
|
(name
|
||||||
|
(direct_name
|
||||||
|
(identifier))))))))
|
||||||
|
(identifier))))
|
||||||
81
corpus/types.txt
Normal file
81
corpus/types.txt
Normal file
|
|
@ -0,0 +1,81 @@
|
||||||
|
================================================================================
|
||||||
|
packages
|
||||||
|
================================================================================
|
||||||
|
|
||||||
|
with Ada.Text_IO;
|
||||||
|
package P1 is
|
||||||
|
package Nested is
|
||||||
|
end Nested;
|
||||||
|
end P1;
|
||||||
|
|
||||||
|
PriVaTe PACKAGE P2 is -- comment to be ignored
|
||||||
|
private
|
||||||
|
end;
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
(compilation
|
||||||
|
(compilation_unit
|
||||||
|
(with_clause
|
||||||
|
(name_list
|
||||||
|
(name
|
||||||
|
(selected_component
|
||||||
|
(name
|
||||||
|
(direct_name
|
||||||
|
(identifier)))
|
||||||
|
(selector_name
|
||||||
|
(direct_name
|
||||||
|
(identifier))))))))
|
||||||
|
(compilation_unit
|
||||||
|
(package_specification
|
||||||
|
(identifier)
|
||||||
|
(package_specification
|
||||||
|
(identifier)
|
||||||
|
(identifier))
|
||||||
|
(identifier)))
|
||||||
|
(compilation_unit
|
||||||
|
(package_specification
|
||||||
|
(identifier)
|
||||||
|
(comment))))
|
||||||
|
|
||||||
|
================================================================================
|
||||||
|
Types
|
||||||
|
================================================================================
|
||||||
|
|
||||||
|
package P is
|
||||||
|
type A is range 1 .. 2;
|
||||||
|
type B is new Integer;
|
||||||
|
end P;
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
(compilation
|
||||||
|
(compilation_unit
|
||||||
|
(package_specification
|
||||||
|
(identifier)
|
||||||
|
(type_declaration
|
||||||
|
(full_type_declaration
|
||||||
|
(identifier)
|
||||||
|
(type_definition
|
||||||
|
(integer_type_definition
|
||||||
|
(signed_integer_type_definition
|
||||||
|
(simple_expression
|
||||||
|
(term
|
||||||
|
(factor
|
||||||
|
(primary
|
||||||
|
(numeric_literal)))))
|
||||||
|
(simple_expression
|
||||||
|
(term
|
||||||
|
(factor
|
||||||
|
(primary
|
||||||
|
(numeric_literal))))))))))
|
||||||
|
(type_declaration
|
||||||
|
(full_type_declaration
|
||||||
|
(identifier)
|
||||||
|
(type_definition
|
||||||
|
(derived_type_definition
|
||||||
|
(subtype_indication
|
||||||
|
(name
|
||||||
|
(direct_name
|
||||||
|
(identifier))))))))
|
||||||
|
(identifier))))
|
||||||
615
grammar.js
Normal file
615
grammar.js
Normal file
|
|
@ -0,0 +1,615 @@
|
||||||
|
function toCaseInsensitive(a) {
|
||||||
|
var ca = a.charCodeAt(0);
|
||||||
|
if (ca>=97 && ca<=122) return `[${a}${a.toUpperCase()}]`;
|
||||||
|
if (ca>=65 && ca<= 90) return `[${a.toLowerCase()}${a}]`;
|
||||||
|
return a;
|
||||||
|
}
|
||||||
|
|
||||||
|
function caseInsensitive (keyword) {
|
||||||
|
//return keyword; // Easier to read conflict messages
|
||||||
|
return new RegExp(keyword
|
||||||
|
.split('')
|
||||||
|
.map(toCaseInsensitive)
|
||||||
|
.join('')
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = grammar({
|
||||||
|
name: 'ada',
|
||||||
|
|
||||||
|
extras: $ => [
|
||||||
|
/\s|\\\r?\n/,
|
||||||
|
$.comment,
|
||||||
|
],
|
||||||
|
|
||||||
|
word: $ => $.identifier,
|
||||||
|
|
||||||
|
rules: {
|
||||||
|
compilation: $ => repeat(
|
||||||
|
$.compilation_unit,
|
||||||
|
),
|
||||||
|
|
||||||
|
identifier: $ => /[a-zA-Z_]\w*/,
|
||||||
|
comment: $ => token(seq('--', /.*/)),
|
||||||
|
string_literal: $ => token(/"[^"]*"/),
|
||||||
|
character_literal: $ => token(/'.'/),
|
||||||
|
numeric_literal: $ => token(
|
||||||
|
choice(
|
||||||
|
/[0-9]/,
|
||||||
|
/[0-9_]+(\.[0-9]+)?([eE][0-9_-]+)?/,
|
||||||
|
/[0-9]+#[0-9a-fA-F._-]+#/
|
||||||
|
)
|
||||||
|
),
|
||||||
|
relational_operator: $ => choice('=', '/=', '<', '<=', '>', '>='),
|
||||||
|
binary_adding_operator: $ => choice('+', '-', '&'),
|
||||||
|
unary_adding_operator: $ => choice('+', '-'),
|
||||||
|
multiplying_operator: $ => choice('*', '/', 'mod', 'rem'),
|
||||||
|
|
||||||
|
name_list: $ => repeat1($.name),
|
||||||
|
name: $ => choice(
|
||||||
|
$.direct_name,
|
||||||
|
$.explicit_dereference,
|
||||||
|
$.selected_component,
|
||||||
|
$.attribute_reference,
|
||||||
|
$.function_call,
|
||||||
|
$.character_literal,
|
||||||
|
$.qualified_expression,
|
||||||
|
'@',
|
||||||
|
),
|
||||||
|
direct_name: $ => choice(
|
||||||
|
$.identifier,
|
||||||
|
$.string_literal,
|
||||||
|
),
|
||||||
|
explicit_dereference: $ => seq(
|
||||||
|
$.name,
|
||||||
|
'.',
|
||||||
|
caseInsensitive('all'),
|
||||||
|
),
|
||||||
|
selected_component: $ => seq(
|
||||||
|
$.name,
|
||||||
|
'.',
|
||||||
|
$.selector_name,
|
||||||
|
),
|
||||||
|
selector_name: $ => choice(
|
||||||
|
$.direct_name,
|
||||||
|
$.character_literal,
|
||||||
|
caseInsensitive('others'),
|
||||||
|
),
|
||||||
|
attribute_reference: $ => choice(
|
||||||
|
seq(
|
||||||
|
$.name,
|
||||||
|
'\'',
|
||||||
|
$.attribute_designator,
|
||||||
|
),
|
||||||
|
// $.reduction_attribute_reference,
|
||||||
|
),
|
||||||
|
// reduction_attribute_reference: $ => seq(
|
||||||
|
// $.value_sequence,
|
||||||
|
// '\'',
|
||||||
|
// $.reduction_attribute_designator,
|
||||||
|
// ),
|
||||||
|
reduction_attribute_designator: $ => seq(
|
||||||
|
$.identifier,
|
||||||
|
'(',
|
||||||
|
$.reduction_specification,
|
||||||
|
')',
|
||||||
|
),
|
||||||
|
reduction_specification: $ => seq(
|
||||||
|
$.name,
|
||||||
|
',',
|
||||||
|
$.expression,
|
||||||
|
),
|
||||||
|
// value_sequence: $ => seq(
|
||||||
|
// '[',
|
||||||
|
// optional(seq(
|
||||||
|
// field('is_parallel', caseInsensitive('parallel')),
|
||||||
|
// optional(seq(
|
||||||
|
// '(',
|
||||||
|
// $.chunk_specification,
|
||||||
|
// ')',
|
||||||
|
// )),
|
||||||
|
// )),
|
||||||
|
// $.iterated_element_association,
|
||||||
|
// ']',
|
||||||
|
// ),
|
||||||
|
chunk_specification: $ => choice(
|
||||||
|
$.simple_expression,
|
||||||
|
seq(
|
||||||
|
$.identifier,
|
||||||
|
caseInsensitive('in'),
|
||||||
|
$.discrete_subtype_definition,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
iterated_element_association: $ => seq(
|
||||||
|
caseInsensitive('for'),
|
||||||
|
choice(
|
||||||
|
$.loop_parameter_specification,
|
||||||
|
$.iterator_specification,
|
||||||
|
),
|
||||||
|
optional(seq(
|
||||||
|
caseInsensitive('use'),
|
||||||
|
$.expression,
|
||||||
|
)),
|
||||||
|
$.assoc_expression,
|
||||||
|
),
|
||||||
|
discrete_subtype_definition: $ => choice(
|
||||||
|
$.subtype_indication,
|
||||||
|
$.range_g,
|
||||||
|
),
|
||||||
|
loop_parameter_specification: $ => seq(
|
||||||
|
$.identifier,
|
||||||
|
caseInsensitive('in'),
|
||||||
|
optional(caseInsensitive('reverse')),
|
||||||
|
$.discrete_subtype_definition,
|
||||||
|
optional($.iterator_filter),
|
||||||
|
),
|
||||||
|
loop_parameter_subtype_indication: $ => choice(
|
||||||
|
$.subtype_indication,
|
||||||
|
$.access_definition,
|
||||||
|
),
|
||||||
|
iterator_filter: $ => seq(
|
||||||
|
caseInsensitive('when'),
|
||||||
|
$.condition,
|
||||||
|
),
|
||||||
|
iterator_specification: $ => seq(
|
||||||
|
$.identifier,
|
||||||
|
optional(seq(
|
||||||
|
':',
|
||||||
|
$.loop_parameter_subtype_indication,
|
||||||
|
)),
|
||||||
|
choice(
|
||||||
|
caseInsensitive('in'),
|
||||||
|
caseInsensitive('of'),
|
||||||
|
),
|
||||||
|
optional(caseInsensitive('reverse')),
|
||||||
|
$.name,
|
||||||
|
optional($.iterator_filter),
|
||||||
|
),
|
||||||
|
attribute_designator: $ => choice(
|
||||||
|
$.identifier,
|
||||||
|
caseInsensitive('access'),
|
||||||
|
caseInsensitive('delta'),
|
||||||
|
caseInsensitive('digits'),
|
||||||
|
caseInsensitive('mod'),
|
||||||
|
),
|
||||||
|
function_call: $ => seq(
|
||||||
|
$.name,
|
||||||
|
$.actual_parameter_part,
|
||||||
|
),
|
||||||
|
qualified_expression: $ => seq(
|
||||||
|
$.name,
|
||||||
|
'\'',
|
||||||
|
$.aggregate,
|
||||||
|
),
|
||||||
|
compilation_unit: $ => choice(
|
||||||
|
$.with_clause,
|
||||||
|
seq(
|
||||||
|
optional(caseInsensitive('private')),
|
||||||
|
$._declarative_item,
|
||||||
|
),
|
||||||
|
$.statement,
|
||||||
|
$.subunit,
|
||||||
|
$.entry_declaration,
|
||||||
|
),
|
||||||
|
_declarative_item: $ => choice(
|
||||||
|
$._basic_declarative_item,
|
||||||
|
$.proper_body,
|
||||||
|
$.body_stub,
|
||||||
|
),
|
||||||
|
_basic_declarative_item: $ => choice(
|
||||||
|
$._basic_declaration,
|
||||||
|
$.aspect_clause,
|
||||||
|
$.use_clause,
|
||||||
|
),
|
||||||
|
_basic_declaration: $ => choice(
|
||||||
|
$.type_declaration,
|
||||||
|
$.subtype_declaration,
|
||||||
|
$.object_declaration,
|
||||||
|
$.number_declaration,
|
||||||
|
$.subprogram_declaration,
|
||||||
|
$.abstract_subprogram_declaration,
|
||||||
|
$.null_procedure_declaration,
|
||||||
|
$.expression_function_declaration,
|
||||||
|
$._package_declaration,
|
||||||
|
$.renaming_declaration,
|
||||||
|
$.exception_declaration,
|
||||||
|
$.generic_declaration,
|
||||||
|
$.generic_instantiation,
|
||||||
|
),
|
||||||
|
_package_declaration: $ => seq(
|
||||||
|
$.package_specification,
|
||||||
|
';',
|
||||||
|
),
|
||||||
|
package_specification: $ => seq(
|
||||||
|
caseInsensitive('package'),
|
||||||
|
field('name', $.identifier),
|
||||||
|
optional($.aspect_specification),
|
||||||
|
caseInsensitive('is'),
|
||||||
|
optional($._basic_declarative_item_list),
|
||||||
|
optional(seq(
|
||||||
|
caseInsensitive('private'),
|
||||||
|
optional($._basic_declarative_item_list),
|
||||||
|
)),
|
||||||
|
caseInsensitive('end'),
|
||||||
|
field('endname', optional($.identifier)),
|
||||||
|
),
|
||||||
|
with_clause: $ => seq(
|
||||||
|
field('is_limited', optional(caseInsensitive('limited'))),
|
||||||
|
field('is_private', optional(caseInsensitive('private'))),
|
||||||
|
caseInsensitive('with'),
|
||||||
|
field('names', $.name_list),
|
||||||
|
';',
|
||||||
|
),
|
||||||
|
subtype_indication: $ => seq(
|
||||||
|
optional($.null_exclusion),
|
||||||
|
$.name,
|
||||||
|
optional($.constraint),
|
||||||
|
),
|
||||||
|
constraint: $ => choice(
|
||||||
|
$.scalar_constraint,
|
||||||
|
$.index_constraint,
|
||||||
|
),
|
||||||
|
scalar_constraint: $ => choice(
|
||||||
|
$.range_constraint,
|
||||||
|
$.digits_constraint,
|
||||||
|
$.delta_constraint,
|
||||||
|
),
|
||||||
|
range_g: $ => choice(
|
||||||
|
// $.range_attribute_reference,
|
||||||
|
seq(
|
||||||
|
$.simple_expression,
|
||||||
|
'..',
|
||||||
|
$.simple_expression,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
range_constraint: $ => seq(
|
||||||
|
caseInsensitive('range'),
|
||||||
|
$.range_g,
|
||||||
|
),
|
||||||
|
condition: $ => seq(
|
||||||
|
$.expression,
|
||||||
|
';',
|
||||||
|
),
|
||||||
|
expression: $ => choice(
|
||||||
|
$.relation,
|
||||||
|
seq($.relation, $.AND_relation_list),
|
||||||
|
seq($.relation, $.AND_THEN_relation_list),
|
||||||
|
seq($.relation, $.OR_relation_list),
|
||||||
|
seq($.relation, $.OR_ELSE_relation_list),
|
||||||
|
seq($.relation, $.XOR_relation_list),
|
||||||
|
),
|
||||||
|
assoc_expression: $ => seq(
|
||||||
|
'=>',
|
||||||
|
choice(
|
||||||
|
$.expression,
|
||||||
|
'<>',
|
||||||
|
),
|
||||||
|
),
|
||||||
|
AND_relation_list: $ => repeat1(seq(
|
||||||
|
caseInsensitive('and'),
|
||||||
|
$.relation,
|
||||||
|
)),
|
||||||
|
AND_THEN_relation_list: $ => repeat1(seq(
|
||||||
|
caseInsensitive('and'),
|
||||||
|
caseInsensitive('then'),
|
||||||
|
$.relation,
|
||||||
|
)),
|
||||||
|
OR_relation_list: $ => repeat1(seq(
|
||||||
|
caseInsensitive('or'),
|
||||||
|
$.relation,
|
||||||
|
)),
|
||||||
|
OR_ELSE_relation_list: $ => repeat1(seq(
|
||||||
|
caseInsensitive('or'),
|
||||||
|
caseInsensitive('else'),
|
||||||
|
$.relation,
|
||||||
|
)),
|
||||||
|
XOR_relation_list: $ => repeat1(seq(
|
||||||
|
caseInsensitive('xor'),
|
||||||
|
$.relation,
|
||||||
|
)),
|
||||||
|
relation: $ => choice(
|
||||||
|
seq(
|
||||||
|
$.simple_expression,
|
||||||
|
optional(seq(
|
||||||
|
$.relational_operator,
|
||||||
|
$.simple_expression,
|
||||||
|
))
|
||||||
|
),
|
||||||
|
// seq(
|
||||||
|
// $.simple_expression,
|
||||||
|
// optional(caseInsensitive('not')),
|
||||||
|
// caseInsensitive('in'),
|
||||||
|
// $.membership_choice_list,
|
||||||
|
// ),
|
||||||
|
// $.raise_expression,
|
||||||
|
),
|
||||||
|
simple_expression: $ => seq(
|
||||||
|
optional($.unary_adding_operator),
|
||||||
|
$.term,
|
||||||
|
repeat(seq(
|
||||||
|
$.binary_adding_operator,
|
||||||
|
$.term,
|
||||||
|
)),
|
||||||
|
),
|
||||||
|
term: $ => seq(
|
||||||
|
$.factor,
|
||||||
|
repeat(seq(
|
||||||
|
$.multiplying_operator,
|
||||||
|
$.factor,
|
||||||
|
)),
|
||||||
|
),
|
||||||
|
factor: $ => choice(
|
||||||
|
seq(
|
||||||
|
$.primary,
|
||||||
|
optional(seq(
|
||||||
|
'**',
|
||||||
|
$.primary,
|
||||||
|
)),
|
||||||
|
),
|
||||||
|
seq(
|
||||||
|
caseInsensitive('abs'),
|
||||||
|
$.primary,
|
||||||
|
),
|
||||||
|
seq(
|
||||||
|
caseInsensitive('not'),
|
||||||
|
$.primary,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
primary: $ => choice(
|
||||||
|
$.numeric_literal,
|
||||||
|
caseInsensitive('null'),
|
||||||
|
$.aggregate,
|
||||||
|
$.name,
|
||||||
|
// $.allocator,
|
||||||
|
),
|
||||||
|
access_definition: $ => choice(
|
||||||
|
seq(
|
||||||
|
optional($.null_exclusion),
|
||||||
|
caseInsensitive('access'),
|
||||||
|
optional(caseInsensitive('constrant')),
|
||||||
|
$.name,
|
||||||
|
),
|
||||||
|
seq(
|
||||||
|
optional($.null_exclusion),
|
||||||
|
caseInsensitive('access'),
|
||||||
|
optional(caseInsensitive('protected')),
|
||||||
|
caseInsensitive('procedure'),
|
||||||
|
// $.parameter_profile,
|
||||||
|
),
|
||||||
|
seq(
|
||||||
|
optional($.null_exclusion),
|
||||||
|
caseInsensitive('access'),
|
||||||
|
optional(caseInsensitive('protected')),
|
||||||
|
caseInsensitive('function'),
|
||||||
|
// $.parameter__and_result_profile,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
actual_parameter_part: $ => seq(
|
||||||
|
'(',
|
||||||
|
choice(
|
||||||
|
seq(
|
||||||
|
$.parameter_association,
|
||||||
|
repeat(seq(
|
||||||
|
',',
|
||||||
|
$.parameter_association,
|
||||||
|
)),
|
||||||
|
),
|
||||||
|
// $.conditional_expression,
|
||||||
|
// $.quantified_expression,
|
||||||
|
// $.declare_expression,
|
||||||
|
),
|
||||||
|
')',
|
||||||
|
),
|
||||||
|
parameter_association: $ => choice(
|
||||||
|
seq(
|
||||||
|
$.component_choice_list,
|
||||||
|
$.assoc_expression,
|
||||||
|
),
|
||||||
|
$.expression,
|
||||||
|
'<>',
|
||||||
|
),
|
||||||
|
component_choice_list: $ => choice(
|
||||||
|
$.selector_name,
|
||||||
|
seq(
|
||||||
|
$.component_choice_list,
|
||||||
|
'|',
|
||||||
|
$.selector_name,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
aggregate: $ => choice(
|
||||||
|
$.record_aggregate,
|
||||||
|
// $.extension_aggregate,
|
||||||
|
// $.array_aggregate,
|
||||||
|
// $.delta_aggregate,
|
||||||
|
// seq(
|
||||||
|
// '(',
|
||||||
|
// choice(
|
||||||
|
// $.conditional_expression,
|
||||||
|
// $.quantified_expression,
|
||||||
|
// $.declare_expression,
|
||||||
|
// ),
|
||||||
|
// ')',
|
||||||
|
// ),
|
||||||
|
),
|
||||||
|
record_aggregate: $ => seq(
|
||||||
|
'(',
|
||||||
|
$.record_component_association_list,
|
||||||
|
')',
|
||||||
|
),
|
||||||
|
record_component_association_list: $ => choice(
|
||||||
|
// seq(
|
||||||
|
// $.record_component_association,
|
||||||
|
// repeat(seq(
|
||||||
|
// ',',
|
||||||
|
// $.record_component_association,
|
||||||
|
// )),
|
||||||
|
// ),
|
||||||
|
seq(
|
||||||
|
caseInsensitive('null'),
|
||||||
|
caseInsensitive('record'),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
null_exclusion: $ => seq(
|
||||||
|
caseInsensitive('not'),
|
||||||
|
caseInsensitive('null'),
|
||||||
|
),
|
||||||
|
index_constraint: $ => seq(
|
||||||
|
'(',
|
||||||
|
// $.discrete_range,
|
||||||
|
// repeat1(seq(
|
||||||
|
// ',',
|
||||||
|
// discrete_range,
|
||||||
|
// )),
|
||||||
|
')',
|
||||||
|
),
|
||||||
|
digits_constraint: $ => seq(
|
||||||
|
caseInsensitive('digits'),
|
||||||
|
$.simple_expression,
|
||||||
|
optional($.range_constraint),
|
||||||
|
),
|
||||||
|
delta_constraint: $ => seq(
|
||||||
|
caseInsensitive('delta'),
|
||||||
|
$.simple_expression,
|
||||||
|
optional($.range_constraint),
|
||||||
|
),
|
||||||
|
_basic_declarative_item_list: $ => repeat1(
|
||||||
|
$._basic_declarative_item_pragma,
|
||||||
|
),
|
||||||
|
_basic_declarative_item_pragma: $ => choice(
|
||||||
|
$._basic_declarative_item,
|
||||||
|
// $.pragma_g,
|
||||||
|
),
|
||||||
|
_basic_declarative_item: $ => choice(
|
||||||
|
$._basic_declaration,
|
||||||
|
$.aspect_clause,
|
||||||
|
$.use_clause,
|
||||||
|
),
|
||||||
|
type_declaration: $ => choice(
|
||||||
|
$.full_type_declaration,
|
||||||
|
// $.incomplete_type_declaration,
|
||||||
|
// $.private_type_declaration,
|
||||||
|
// $.private_extension_declaration,
|
||||||
|
),
|
||||||
|
full_type_declaration: $ => choice(
|
||||||
|
seq(
|
||||||
|
caseInsensitive('type'),
|
||||||
|
$.identifier,
|
||||||
|
// optional($.known_discriminant_part),
|
||||||
|
caseInsensitive('is'),
|
||||||
|
$.type_definition,
|
||||||
|
// optional($.aspect_specification),
|
||||||
|
';',
|
||||||
|
),
|
||||||
|
// $.task_type_declaration,
|
||||||
|
// $.protected_type_declaration,
|
||||||
|
),
|
||||||
|
type_definition: $ => choice(
|
||||||
|
// $.enumeration_type_definition,
|
||||||
|
$.integer_type_definition,
|
||||||
|
// $.real_type_definition,
|
||||||
|
// $.array_type_definition,
|
||||||
|
// $.record_type_definition,
|
||||||
|
// $.access_type_definition,
|
||||||
|
$.derived_type_definition,
|
||||||
|
// $.interface_type_definition,
|
||||||
|
),
|
||||||
|
integer_type_definition: $ => choice(
|
||||||
|
$.signed_integer_type_definition,
|
||||||
|
// $.modular_type_definition,
|
||||||
|
),
|
||||||
|
signed_integer_type_definition: $ => seq(
|
||||||
|
caseInsensitive('range'),
|
||||||
|
$.simple_expression,
|
||||||
|
'..',
|
||||||
|
$.simple_expression,
|
||||||
|
),
|
||||||
|
derived_type_definition: $ => seq(
|
||||||
|
optional(caseInsensitive('abstract')),
|
||||||
|
optional(caseInsensitive('limited')),
|
||||||
|
caseInsensitive('new'),
|
||||||
|
$.subtype_indication,
|
||||||
|
optional(seq(
|
||||||
|
// optional(seq(
|
||||||
|
// caseInsensitive('and'),
|
||||||
|
// $.interface_list,
|
||||||
|
// )),
|
||||||
|
$.record_extension_part,
|
||||||
|
)),
|
||||||
|
),
|
||||||
|
record_extension_part: $ => seq(
|
||||||
|
caseInsensitive('with'),
|
||||||
|
$.record_definition,
|
||||||
|
),
|
||||||
|
record_definition: $ => choice(
|
||||||
|
seq(
|
||||||
|
caseInsensitive('record'),
|
||||||
|
$.component_list,
|
||||||
|
caseInsensitive('end'),
|
||||||
|
caseInsensitive('record'),
|
||||||
|
optional($.identifier),
|
||||||
|
),
|
||||||
|
seq(
|
||||||
|
caseInsensitive('null'),
|
||||||
|
caseInsensitive('record'),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
component_list: $ => choice(
|
||||||
|
repeat1($.component_item),
|
||||||
|
// seq(
|
||||||
|
// optional($.component_item),
|
||||||
|
// $.variant_part,
|
||||||
|
// ),
|
||||||
|
caseInsensitive('null'),
|
||||||
|
),
|
||||||
|
component_item: $ => seq(
|
||||||
|
$.component_declaration,
|
||||||
|
$.aspect_clause,
|
||||||
|
),
|
||||||
|
component_declaration: $ => seq(
|
||||||
|
$.defining_identifier_list,
|
||||||
|
':',
|
||||||
|
$.component_definition,
|
||||||
|
// optional($.assign_value),
|
||||||
|
// optional($.aspect_specification),
|
||||||
|
';'
|
||||||
|
),
|
||||||
|
defining_identifier_list: $ => seq(
|
||||||
|
$.identifier,
|
||||||
|
repeat(seq(
|
||||||
|
',',
|
||||||
|
$.identifier,
|
||||||
|
)),
|
||||||
|
),
|
||||||
|
component_definition: $ => seq(
|
||||||
|
optional(caseInsensitive('aliased')),
|
||||||
|
choice(
|
||||||
|
$.subtype_indication,
|
||||||
|
// $.access_definition,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
|
||||||
|
// TODO
|
||||||
|
|
||||||
|
abstract_subprogram_declaration: $ => 'foo1',
|
||||||
|
aspect_clause: $ => "foo2",
|
||||||
|
aspect_specification: $ => 'foo3',
|
||||||
|
body_stub: $ => "foo6",
|
||||||
|
entry_declaration: $ => 'foo7',
|
||||||
|
exception_declaration: $ => 'foo8',
|
||||||
|
expression_function_declaration: $ => 'foo9',
|
||||||
|
generic_declaration: $ => 'foo10',
|
||||||
|
generic_instantiation: $ => 'foo11',
|
||||||
|
null_procedure_declaration: $ => 'foo24',
|
||||||
|
number_declaration: $ => 'foo12',
|
||||||
|
object_declaration: $ => 'foo13',
|
||||||
|
proper_body: $ => "foo15",
|
||||||
|
renaming_declaration: $ => 'foo16',
|
||||||
|
statement: $ => 'foo17',
|
||||||
|
subprogram_declaration: $ => 'foo18',
|
||||||
|
subtype_declaration: $ => 'foo19',
|
||||||
|
subunit: $ => 'foo20',
|
||||||
|
use_clause: $ => "foo22",
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
439
package-lock.json
generated
Normal file
439
package-lock.json
generated
Normal file
|
|
@ -0,0 +1,439 @@
|
||||||
|
{
|
||||||
|
"name": "tree-sitter-ada",
|
||||||
|
"version": "0.1.0",
|
||||||
|
"lockfileVersion": 1,
|
||||||
|
"requires": true,
|
||||||
|
"dependencies": {
|
||||||
|
"ansi-regex": {
|
||||||
|
"version": "2.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
|
||||||
|
"integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA=="
|
||||||
|
},
|
||||||
|
"aproba": {
|
||||||
|
"version": "1.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz",
|
||||||
|
"integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw=="
|
||||||
|
},
|
||||||
|
"are-we-there-yet": {
|
||||||
|
"version": "1.1.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.7.tgz",
|
||||||
|
"integrity": "sha512-nxwy40TuMiUGqMyRHgCSWZ9FM4VAoRP4xUYSTv5ImRog+h9yISPbVH7H8fASCIzYn9wlEv4zvFL7uKDMCFQm3g==",
|
||||||
|
"requires": {
|
||||||
|
"delegates": "^1.0.0",
|
||||||
|
"readable-stream": "^2.0.6"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"base64-js": {
|
||||||
|
"version": "1.5.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
|
||||||
|
"integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA=="
|
||||||
|
},
|
||||||
|
"bl": {
|
||||||
|
"version": "4.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz",
|
||||||
|
"integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==",
|
||||||
|
"requires": {
|
||||||
|
"buffer": "^5.5.0",
|
||||||
|
"inherits": "^2.0.4",
|
||||||
|
"readable-stream": "^3.4.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"readable-stream": {
|
||||||
|
"version": "3.6.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz",
|
||||||
|
"integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==",
|
||||||
|
"requires": {
|
||||||
|
"inherits": "^2.0.3",
|
||||||
|
"string_decoder": "^1.1.1",
|
||||||
|
"util-deprecate": "^1.0.1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"buffer": {
|
||||||
|
"version": "5.7.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz",
|
||||||
|
"integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==",
|
||||||
|
"requires": {
|
||||||
|
"base64-js": "^1.3.1",
|
||||||
|
"ieee754": "^1.1.13"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"chownr": {
|
||||||
|
"version": "1.1.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz",
|
||||||
|
"integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg=="
|
||||||
|
},
|
||||||
|
"code-point-at": {
|
||||||
|
"version": "1.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz",
|
||||||
|
"integrity": "sha512-RpAVKQA5T63xEj6/giIbUEtZwJ4UFIc3ZtvEkiaUERylqe8xb5IvqcgOurZLahv93CLKfxcw5YI+DZcUBRyLXA=="
|
||||||
|
},
|
||||||
|
"console-control-strings": {
|
||||||
|
"version": "1.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz",
|
||||||
|
"integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ=="
|
||||||
|
},
|
||||||
|
"core-util-is": {
|
||||||
|
"version": "1.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz",
|
||||||
|
"integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ=="
|
||||||
|
},
|
||||||
|
"decompress-response": {
|
||||||
|
"version": "4.2.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-4.2.1.tgz",
|
||||||
|
"integrity": "sha512-jOSne2qbyE+/r8G1VU+G/82LBs2Fs4LAsTiLSHOCOMZQl2OKZ6i8i4IyHemTe+/yIXOtTcRQMzPcgyhoFlqPkw==",
|
||||||
|
"requires": {
|
||||||
|
"mimic-response": "^2.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"deep-extend": {
|
||||||
|
"version": "0.6.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz",
|
||||||
|
"integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA=="
|
||||||
|
},
|
||||||
|
"delegates": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz",
|
||||||
|
"integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ=="
|
||||||
|
},
|
||||||
|
"detect-libc": {
|
||||||
|
"version": "1.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz",
|
||||||
|
"integrity": "sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg=="
|
||||||
|
},
|
||||||
|
"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==",
|
||||||
|
"requires": {
|
||||||
|
"once": "^1.4.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"expand-template": {
|
||||||
|
"version": "2.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz",
|
||||||
|
"integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg=="
|
||||||
|
},
|
||||||
|
"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=="
|
||||||
|
},
|
||||||
|
"gauge": {
|
||||||
|
"version": "2.7.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz",
|
||||||
|
"integrity": "sha512-14x4kjc6lkD3ltw589k0NrPD6cCNTD6CWoVUNpB85+DrtONoZn+Rug6xZU5RvSC4+TZPxA5AnBibQYAvZn41Hg==",
|
||||||
|
"requires": {
|
||||||
|
"aproba": "^1.0.3",
|
||||||
|
"console-control-strings": "^1.0.0",
|
||||||
|
"has-unicode": "^2.0.0",
|
||||||
|
"object-assign": "^4.1.0",
|
||||||
|
"signal-exit": "^3.0.0",
|
||||||
|
"string-width": "^1.0.1",
|
||||||
|
"strip-ansi": "^3.0.1",
|
||||||
|
"wide-align": "^1.1.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"github-from-package": {
|
||||||
|
"version": "0.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz",
|
||||||
|
"integrity": "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw=="
|
||||||
|
},
|
||||||
|
"has-unicode": {
|
||||||
|
"version": "2.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz",
|
||||||
|
"integrity": "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ=="
|
||||||
|
},
|
||||||
|
"ieee754": {
|
||||||
|
"version": "1.2.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
|
||||||
|
"integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA=="
|
||||||
|
},
|
||||||
|
"inherits": {
|
||||||
|
"version": "2.0.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
|
||||||
|
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
|
||||||
|
},
|
||||||
|
"ini": {
|
||||||
|
"version": "1.3.8",
|
||||||
|
"resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz",
|
||||||
|
"integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew=="
|
||||||
|
},
|
||||||
|
"is-fullwidth-code-point": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
|
||||||
|
"integrity": "sha512-1pqUqRjkhPJ9miNq9SwMfdvi6lBJcd6eFxvfaivQhaH3SgisfiuudvFntdKOmxuee/77l+FPjKrQjWvmPjWrRw==",
|
||||||
|
"requires": {
|
||||||
|
"number-is-nan": "^1.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"isarray": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
|
||||||
|
"integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ=="
|
||||||
|
},
|
||||||
|
"mimic-response": {
|
||||||
|
"version": "2.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-2.1.0.tgz",
|
||||||
|
"integrity": "sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA=="
|
||||||
|
},
|
||||||
|
"minimist": {
|
||||||
|
"version": "1.2.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.7.tgz",
|
||||||
|
"integrity": "sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g=="
|
||||||
|
},
|
||||||
|
"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=="
|
||||||
|
},
|
||||||
|
"nan": {
|
||||||
|
"version": "2.17.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/nan/-/nan-2.17.0.tgz",
|
||||||
|
"integrity": "sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ=="
|
||||||
|
},
|
||||||
|
"napi-build-utils": {
|
||||||
|
"version": "1.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz",
|
||||||
|
"integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg=="
|
||||||
|
},
|
||||||
|
"node-abi": {
|
||||||
|
"version": "2.30.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.30.1.tgz",
|
||||||
|
"integrity": "sha512-/2D0wOQPgaUWzVSVgRMx+trKJRC2UG4SUc4oCJoXx9Uxjtp0Vy3/kt7zcbxHF8+Z/pK3UloLWzBISg72brfy1w==",
|
||||||
|
"requires": {
|
||||||
|
"semver": "^5.4.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"npmlog": {
|
||||||
|
"version": "4.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz",
|
||||||
|
"integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==",
|
||||||
|
"requires": {
|
||||||
|
"are-we-there-yet": "~1.1.2",
|
||||||
|
"console-control-strings": "~1.1.0",
|
||||||
|
"gauge": "~2.7.3",
|
||||||
|
"set-blocking": "~2.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"number-is-nan": {
|
||||||
|
"version": "1.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz",
|
||||||
|
"integrity": "sha512-4jbtZXNAsfZbAHiiqjLPBiCl16dES1zI4Hpzzxw61Tk+loF+sBDBKx1ICKKKwIqQ7M0mFn1TmkN7euSncWgHiQ=="
|
||||||
|
},
|
||||||
|
"object-assign": {
|
||||||
|
"version": "4.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
|
||||||
|
"integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg=="
|
||||||
|
},
|
||||||
|
"once": {
|
||||||
|
"version": "1.4.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
|
||||||
|
"integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
|
||||||
|
"requires": {
|
||||||
|
"wrappy": "1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"prebuild-install": {
|
||||||
|
"version": "6.1.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-6.1.4.tgz",
|
||||||
|
"integrity": "sha512-Z4vpywnK1lBg+zdPCVCsKq0xO66eEV9rWo2zrROGGiRS4JtueBOdlB1FnY8lcy7JsUud/Q3ijUxyWN26Ika0vQ==",
|
||||||
|
"requires": {
|
||||||
|
"detect-libc": "^1.0.3",
|
||||||
|
"expand-template": "^2.0.3",
|
||||||
|
"github-from-package": "0.0.0",
|
||||||
|
"minimist": "^1.2.3",
|
||||||
|
"mkdirp-classic": "^0.5.3",
|
||||||
|
"napi-build-utils": "^1.0.1",
|
||||||
|
"node-abi": "^2.21.0",
|
||||||
|
"npmlog": "^4.0.1",
|
||||||
|
"pump": "^3.0.0",
|
||||||
|
"rc": "^1.2.7",
|
||||||
|
"simple-get": "^3.0.3",
|
||||||
|
"tar-fs": "^2.0.0",
|
||||||
|
"tunnel-agent": "^0.6.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"process-nextick-args": {
|
||||||
|
"version": "2.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
|
||||||
|
"integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag=="
|
||||||
|
},
|
||||||
|
"pump": {
|
||||||
|
"version": "3.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz",
|
||||||
|
"integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==",
|
||||||
|
"requires": {
|
||||||
|
"end-of-stream": "^1.1.0",
|
||||||
|
"once": "^1.3.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"rc": {
|
||||||
|
"version": "1.2.8",
|
||||||
|
"resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz",
|
||||||
|
"integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==",
|
||||||
|
"requires": {
|
||||||
|
"deep-extend": "^0.6.0",
|
||||||
|
"ini": "~1.3.0",
|
||||||
|
"minimist": "^1.2.0",
|
||||||
|
"strip-json-comments": "~2.0.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"readable-stream": {
|
||||||
|
"version": "2.3.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
|
||||||
|
"integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==",
|
||||||
|
"requires": {
|
||||||
|
"core-util-is": "~1.0.0",
|
||||||
|
"inherits": "~2.0.3",
|
||||||
|
"isarray": "~1.0.0",
|
||||||
|
"process-nextick-args": "~2.0.0",
|
||||||
|
"safe-buffer": "~5.1.1",
|
||||||
|
"string_decoder": "~1.1.1",
|
||||||
|
"util-deprecate": "~1.0.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"safe-buffer": {
|
||||||
|
"version": "5.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
|
||||||
|
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
|
||||||
|
},
|
||||||
|
"semver": {
|
||||||
|
"version": "5.7.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
|
||||||
|
"integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ=="
|
||||||
|
},
|
||||||
|
"set-blocking": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
|
||||||
|
"integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw=="
|
||||||
|
},
|
||||||
|
"signal-exit": {
|
||||||
|
"version": "3.0.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz",
|
||||||
|
"integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ=="
|
||||||
|
},
|
||||||
|
"simple-concat": {
|
||||||
|
"version": "1.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz",
|
||||||
|
"integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q=="
|
||||||
|
},
|
||||||
|
"simple-get": {
|
||||||
|
"version": "3.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/simple-get/-/simple-get-3.1.1.tgz",
|
||||||
|
"integrity": "sha512-CQ5LTKGfCpvE1K0n2us+kuMPbk/q0EKl82s4aheV9oXjFEz6W/Y7oQFVJuU6QG77hRT4Ghb5RURteF5vnWjupA==",
|
||||||
|
"requires": {
|
||||||
|
"decompress-response": "^4.2.0",
|
||||||
|
"once": "^1.3.1",
|
||||||
|
"simple-concat": "^1.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"string-width": {
|
||||||
|
"version": "1.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
|
||||||
|
"integrity": "sha512-0XsVpQLnVCXHJfyEs8tC0zpTVIr5PKKsQtkT29IwupnPTjtPmQ3xT/4yCREF9hYkV/3M3kzcUTSAZT6a6h81tw==",
|
||||||
|
"requires": {
|
||||||
|
"code-point-at": "^1.0.0",
|
||||||
|
"is-fullwidth-code-point": "^1.0.0",
|
||||||
|
"strip-ansi": "^3.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"string_decoder": {
|
||||||
|
"version": "1.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
|
||||||
|
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
|
||||||
|
"requires": {
|
||||||
|
"safe-buffer": "~5.1.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"strip-ansi": {
|
||||||
|
"version": "3.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
|
||||||
|
"integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==",
|
||||||
|
"requires": {
|
||||||
|
"ansi-regex": "^2.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"strip-json-comments": {
|
||||||
|
"version": "2.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz",
|
||||||
|
"integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ=="
|
||||||
|
},
|
||||||
|
"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==",
|
||||||
|
"requires": {
|
||||||
|
"chownr": "^1.1.1",
|
||||||
|
"mkdirp-classic": "^0.5.2",
|
||||||
|
"pump": "^3.0.0",
|
||||||
|
"tar-stream": "^2.1.4"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"tar-stream": {
|
||||||
|
"version": "2.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz",
|
||||||
|
"integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==",
|
||||||
|
"requires": {
|
||||||
|
"bl": "^4.0.3",
|
||||||
|
"end-of-stream": "^1.4.1",
|
||||||
|
"fs-constants": "^1.0.0",
|
||||||
|
"inherits": "^2.0.3",
|
||||||
|
"readable-stream": "^3.1.1"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"readable-stream": {
|
||||||
|
"version": "3.6.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz",
|
||||||
|
"integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==",
|
||||||
|
"requires": {
|
||||||
|
"inherits": "^2.0.3",
|
||||||
|
"string_decoder": "^1.1.1",
|
||||||
|
"util-deprecate": "^1.0.1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"tree-sitter": {
|
||||||
|
"version": "0.20.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/tree-sitter/-/tree-sitter-0.20.0.tgz",
|
||||||
|
"integrity": "sha512-tqTdtD1T2cN4aEES0sZCjKTQrc9Ls8H/iYlzpskhGy8yCwNPKBIbK9YuuCg/AxACr8RAY4wMoeCigM1X/A79yg==",
|
||||||
|
"requires": {
|
||||||
|
"nan": "^2.14.0",
|
||||||
|
"prebuild-install": "^6.0.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"tree-sitter-cli": {
|
||||||
|
"version": "0.20.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/tree-sitter-cli/-/tree-sitter-cli-0.20.7.tgz",
|
||||||
|
"integrity": "sha512-MHABT8oCPr4D0fatsPo6ATQ9H4h9vHpPRjlxkxJs80tpfAEKGn6A1zU3eqfCKBcgmfZDe9CiL3rKOGMzYHwA3w=="
|
||||||
|
},
|
||||||
|
"tunnel-agent": {
|
||||||
|
"version": "0.6.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
|
||||||
|
"integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==",
|
||||||
|
"requires": {
|
||||||
|
"safe-buffer": "^5.0.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"util-deprecate": {
|
||||||
|
"version": "1.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
|
||||||
|
"integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw=="
|
||||||
|
},
|
||||||
|
"wide-align": {
|
||||||
|
"version": "1.1.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz",
|
||||||
|
"integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==",
|
||||||
|
"requires": {
|
||||||
|
"string-width": "^1.0.2 || 2 || 3 || 4"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"wrappy": {
|
||||||
|
"version": "1.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
|
||||||
|
"integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ=="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
15
package.json
Normal file
15
package.json
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
{
|
||||||
|
"name": "tree-sitter-ada",
|
||||||
|
"version": "0.1.0",
|
||||||
|
"private": true,
|
||||||
|
"dependencies": {
|
||||||
|
"tree-sitter": "0.20.0",
|
||||||
|
"tree-sitter-cli": "0.20.7"
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"generate": "tree-sitter generate",
|
||||||
|
"test": "tree-sitter generate && tree-sitter test",
|
||||||
|
"example1": "tree-sitter parse example1.adb"
|
||||||
|
},
|
||||||
|
"main": "bindings/node"
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user