Zephir: add some tag parser tests
This commit is contained in:
parent
b1f93c2977
commit
4e0193d8f1
@ -212,6 +212,7 @@ test_sources = \
|
||||
recursive.f95 \
|
||||
refcurs.sql \
|
||||
regexp.js \
|
||||
return-hint.zep \
|
||||
secondary_fcn_name.js \
|
||||
semicolon.f90 \
|
||||
shebang.js \
|
||||
@ -229,6 +230,7 @@ test_sources = \
|
||||
simple.rb \
|
||||
simple.sh \
|
||||
simple.tcl \
|
||||
simple.zep \
|
||||
spurious_label_tags.c \
|
||||
sql_single_quote.sql \
|
||||
square_parens.f90 \
|
||||
|
14
tests/ctags/return-hint.zep
Normal file
14
tests/ctags/return-hint.zep
Normal file
@ -0,0 +1,14 @@
|
||||
class Test
|
||||
{
|
||||
public function first(string str) -> string
|
||||
{
|
||||
function nested() {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public function second(int i) -> int
|
||||
{
|
||||
|
||||
}
|
||||
}
|
5
tests/ctags/return-hint.zep.tags
Normal file
5
tests/ctags/return-hint.zep.tags
Normal file
@ -0,0 +1,5 @@
|
||||
# format=tagmanager
|
||||
TestÌ1Ö0
|
||||
firstÌ16Í(string str)ÎTestÖ0
|
||||
nestedÌ16Í()ÎTest::firstÖ0
|
||||
secondÌ16Í(int i)ÎTestÖ0
|
19
tests/ctags/simple.zep
Normal file
19
tests/ctags/simple.zep
Normal file
@ -0,0 +1,19 @@
|
||||
/* from http://zephir-lang.com/language.html */
|
||||
namespace Test;
|
||||
|
||||
class MyClass
|
||||
{
|
||||
|
||||
public function someMethod1()
|
||||
{
|
||||
int a = 1, b = 2;
|
||||
return a + b;
|
||||
}
|
||||
|
||||
public function someMethod2()
|
||||
{
|
||||
int a = 3, b = 4;
|
||||
return a + b;
|
||||
}
|
||||
|
||||
}
|
5
tests/ctags/simple.zep.tags
Normal file
5
tests/ctags/simple.zep.tags
Normal file
@ -0,0 +1,5 @@
|
||||
# format=tagmanager
|
||||
MyClassÌ1ÎTestÖ0
|
||||
TestÌ256Ö0
|
||||
someMethod1Ì16Í()ÎTest::MyClassÖ0
|
||||
someMethod2Ì16Í()ÎTest::MyClassÖ0
|
Loading…
x
Reference in New Issue
Block a user