1
1
mirror of https://github.com/github/semantic.git synced 2024-12-01 00:33:59 +03:00

Add function type and array type

This commit is contained in:
joshvera 2017-03-28 11:22:27 -04:00
parent f2666fd5bd
commit 285bd71606
20 changed files with 147 additions and 0 deletions

View File

@ -0,0 +1 @@
let x: A[];

View File

@ -0,0 +1 @@
let x: [A,B];

View File

@ -0,0 +1,8 @@
{+(Program
(Other "lexical_declaration"
(VarAssignment
(Identifier)
(Ty
(Other "array_type"
(Other "type_reference"
(Identifier)))))))+}

View File

@ -0,0 +1,10 @@
{+(Program
(Other "lexical_declaration"
(VarAssignment
(Identifier)
(Ty
(Other "tuple_type"
(Other "type_reference"
(Identifier))
(Other "type_reference"
(Identifier)))))))+}

View File

@ -0,0 +1,8 @@
{-(Program
(Other "lexical_declaration"
(VarAssignment
(Identifier)
(Ty
(Other "array_type"
(Other "type_reference"
(Identifier)))))))-}

View File

@ -0,0 +1,10 @@
{-(Program
(Other "lexical_declaration"
(VarAssignment
(Identifier)
(Ty
(Other "tuple_type"
(Other "type_reference"
(Identifier))
(Other "type_reference"
(Identifier)))))))-}

View File

@ -0,0 +1,10 @@
(Program
(Other "lexical_declaration"
(VarAssignment
(Identifier)
(Ty
(Other "tuple_type"
(Other "type_reference"
(Identifier))
{+(Other "type_reference"
(Identifier))+})))))

View File

@ -0,0 +1,10 @@
(Program
(Other "lexical_declaration"
(VarAssignment
(Identifier)
(Ty
(Other "array_type"
(Other "type_reference"
(Identifier))
{-(Other "type_reference"
(Identifier))-})))))

View File

@ -0,0 +1,8 @@
(Program
(Other "lexical_declaration"
(VarAssignment
(Identifier)
(Ty
(Other "array_type"
(Other "type_reference"
(Identifier)))))))

View File

@ -0,0 +1,10 @@
(Program
(Other "lexical_declaration"
(VarAssignment
(Identifier)
(Ty
(Other "tuple_type"
(Other "type_reference"
(Identifier))
(Other "type_reference"
(Identifier)))))))

View File

@ -0,0 +1 @@
let x: () => A;

View File

@ -0,0 +1 @@
let x: A[];

View File

@ -0,0 +1,9 @@
{+(Program
(Other "lexical_declaration"
(VarAssignment
(Identifier)
(Ty
(Other "function_type"
(Params)
(Other "type_reference"
(Identifier)))))))+}

View File

@ -0,0 +1,8 @@
{+(Program
(Other "lexical_declaration"
(VarAssignment
(Identifier)
(Ty
(Other "array_type"
(Other "type_reference"
(Identifier)))))))+}

View File

@ -0,0 +1,9 @@
{-(Program
(Other "lexical_declaration"
(VarAssignment
(Identifier)
(Ty
(Other "function_type"
(Params)
(Other "type_reference"
(Identifier)))))))-}

View File

@ -0,0 +1,8 @@
{-(Program
(Other "lexical_declaration"
(VarAssignment
(Identifier)
(Ty
(Other "array_type"
(Other "type_reference"
(Identifier)))))))-}

View File

@ -0,0 +1,9 @@
(Program
(Other "lexical_declaration"
(VarAssignment
(Identifier)
(Ty
(Other "array_type"
{-(Params)-}
(Other "type_reference"
(Identifier)))))))

View File

@ -0,0 +1,9 @@
(Program
(Other "lexical_declaration"
(VarAssignment
(Identifier)
(Ty
(Other "function_type"
{+(Params)+}
(Other "type_reference"
(Identifier)))))))

View File

@ -0,0 +1,9 @@
(Program
(Other "lexical_declaration"
(VarAssignment
(Identifier)
(Ty
(Other "function_type"
(Params)
(Other "type_reference"
(Identifier)))))))

View File

@ -0,0 +1,8 @@
(Program
(Other "lexical_declaration"
(VarAssignment
(Identifier)
(Ty
(Other "array_type"
(Other "type_reference"
(Identifier)))))))