initial checking
This commit is contained in:
47
test/corpus/import statements.txt
Normal file
47
test/corpus/import statements.txt
Normal file
@@ -0,0 +1,47 @@
|
||||
================================================================================
|
||||
single identifier import
|
||||
================================================================================
|
||||
import wibble
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
(source_file
|
||||
(import_statement
|
||||
(identifier)))
|
||||
|
||||
================================================================================
|
||||
multiple identifier import
|
||||
================================================================================
|
||||
import wobble.qq
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
(source_file
|
||||
(import_statement
|
||||
(identifier)
|
||||
(identifier)))
|
||||
|
||||
================================================================================
|
||||
wildcard import
|
||||
================================================================================
|
||||
import flobble.fnurfle.*
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
(source_file
|
||||
(import_statement
|
||||
(identifier)
|
||||
(identifier)))
|
||||
|
||||
================================================================================
|
||||
multiple imports semicolon separated
|
||||
================================================================================
|
||||
import qq.ss; import flobble.*;
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
(source_file
|
||||
(import_statement
|
||||
(identifier)
|
||||
(identifier))
|
||||
(import_statement
|
||||
(identifier)))
|
||||
20
test/corpus/package definition.txt
Normal file
20
test/corpus/package definition.txt
Normal file
@@ -0,0 +1,20 @@
|
||||
================================================================================
|
||||
Simple package definition
|
||||
================================================================================
|
||||
package flob
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
(source_file
|
||||
(package_definition
|
||||
(identifier)))
|
||||
|
||||
================================================================================
|
||||
Dotted package definition
|
||||
================================================================================
|
||||
package flob.wibble
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
(source_file
|
||||
(package_definition
|
||||
(identifier)
|
||||
(identifier)))
|
||||
33
test/corpus/shebang.txt
Normal file
33
test/corpus/shebang.txt
Normal file
@@ -0,0 +1,33 @@
|
||||
================================================================================
|
||||
Shebang ignored at beginning of first line
|
||||
================================================================================
|
||||
#!/usr/bin/env groovy
|
||||
hello
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
(source_file
|
||||
(script_part
|
||||
(statement
|
||||
(expression
|
||||
(path_expression
|
||||
(identifier))))))
|
||||
|
||||
================================================================================
|
||||
Shebang not ignored after first character
|
||||
================================================================================
|
||||
#!/usr/bin/env groovy
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
(source_file
|
||||
(ERROR
|
||||
(UNEXPECTED '#')
|
||||
(identifier)
|
||||
(UNEXPECTED '/')
|
||||
(identifier)
|
||||
(UNEXPECTED '/')
|
||||
(identifier))
|
||||
(script_part
|
||||
(statement
|
||||
(expression
|
||||
(path_expression
|
||||
(identifier))))))
|
||||
90
test/corpus/statements.txt
Normal file
90
test/corpus/statements.txt
Normal file
@@ -0,0 +1,90 @@
|
||||
================================================================================
|
||||
Empty File
|
||||
================================================================================
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
(source_file)
|
||||
|
||||
================================================================================
|
||||
statement - single identifier
|
||||
================================================================================
|
||||
hello
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
(source_file
|
||||
(script_part
|
||||
(statement
|
||||
(expression
|
||||
(path_expression
|
||||
(identifier))))))
|
||||
|
||||
================================================================================
|
||||
statement - Simple method definition
|
||||
================================================================================
|
||||
def hello
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
(source_file
|
||||
(script_part
|
||||
(method_declaration
|
||||
(identifier))))
|
||||
|
||||
================================================================================
|
||||
statement - Multiple statements same line
|
||||
================================================================================
|
||||
hello;goodbye;def flunk
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
(source_file
|
||||
(script_part
|
||||
(statement
|
||||
(expression
|
||||
(path_expression
|
||||
(identifier)))))
|
||||
(script_part
|
||||
(statement
|
||||
(expression
|
||||
(path_expression
|
||||
(identifier)))))
|
||||
(script_part
|
||||
(method_declaration
|
||||
(identifier))))
|
||||
|
||||
================================================================================
|
||||
statement - Multiple Statements, Multiple Lines
|
||||
================================================================================
|
||||
hello
|
||||
def flunk
|
||||
goodbye;
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
(source_file
|
||||
(script_part
|
||||
(statement
|
||||
(expression
|
||||
(path_expression
|
||||
(identifier)))))
|
||||
(script_part
|
||||
(method_declaration
|
||||
(identifier)))
|
||||
(script_part
|
||||
(statement
|
||||
(expression
|
||||
(path_expression
|
||||
(identifier))))))
|
||||
|
||||
================================================================================
|
||||
statement - path expression multiple parts
|
||||
================================================================================
|
||||
wibble.wobble.q
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
(source_file
|
||||
(script_part
|
||||
(statement
|
||||
(expression
|
||||
(path_expression
|
||||
(identifier)
|
||||
(identifier)
|
||||
(identifier))))))
|
||||
Reference in New Issue
Block a user