Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Units/parser-genie.r/simple.genie.b/args.ctags
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
--sort=no
--fields=+neKl
1 change: 1 addition & 0 deletions Units/parser-genie.r/simple.genie.b/expected.tags
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
main input.gs 1;" method line:1 language:Genie
2 changes: 2 additions & 0 deletions Units/parser-genie.r/simple.genie.b/input.gs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
init
print "Hello World"
2 changes: 2 additions & 0 deletions Units/parser-vala.r/class.vala.d/args.ctags
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
--sort=no
--fields=+neKl
10 changes: 10 additions & 0 deletions Units/parser-vala.r/class.vala.d/expected.tags
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
main input.vala /^void main(string[] args) {$/;" method line:8 language:Vala
Address input.vala /^class Address {$/;" class line:15 language:Vala
country input.vala /^ string country;$/;" field line:16 language:Vala class:Address typeref:typename:string
city input.vala /^ string city;$/;" field line:17 language:Vala class:Address typeref:typename:string
street input.vala /^ string street;$/;" field line:18 language:Vala class:Address typeref:typename:string
building input.vala /^ int building;$/;" field line:19 language:Vala class:Address typeref:typename:int
floor input.vala /^ int floor;$/;" field line:20 language:Vala class:Address typeref:typename:int
Person input.vala /^class Person {$/;" class line:23 language:Vala
address input.vala /^ public Address address {get; set;}$/;" property line:24 language:Vala class:Person typeref:unknown:Address
name input.vala /^ public string name {get; set;}$/;" property line:25 language:Vala class:Person typeref:typename:string
38 changes: 38 additions & 0 deletions Units/parser-vala.r/class.vala.d/input.vala
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/*
* vala HelloWorld
*
* $ valac input.vala
* $ ./input
* Hello John, you're 21 years old
*/
void main(string[] args) {
var p = new Person();
p.name = "John";
p.age = 21;
print("Hello %s, you're %d years old\n", p.name, p.age);
}

class Address {
string country;
string city;
string street;
int building;
int floor;
}

class Person {
public Address address {get; set;}
public string name {get; set;}
private int d_age;

public int age {
get { return d_age;}
set {
if (value > 0) {
d_age = value;
} else {
d_age = 0;
}
}
}
}
2 changes: 2 additions & 0 deletions Units/parser-vala.r/comments.vala.d/args.ctags
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
--sort=no
--fields=+neKl
6 changes: 6 additions & 0 deletions Units/parser-vala.r/comments.vala.d/expected.tags
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
f1 input.vala /^void f1 () {$/;" method line:1 language:Vala
f2 input.vala /^void f2 () {print ("hello");} \/\/ void g3 () { print ("hello");}$/;" method line:7 language:Vala
f3 input.vala /^void f3 () {print ("hello");} void g4 () { print ("hello");}$/;" method line:8 language:Vala
g4 input.vala /^void f3 () {print ("hello");} void g4 () { print ("hello");}$/;" method line:8 language:Vala
f4 input.vala /^void f4 () {print ("hello"); \/\/ void g5 () { print ("hello");}$/;" method line:9 language:Vala
g7 input.vala /^} void g7 () { print ("hello");} \/\/ void g8 () {} ; void f5 () { print ("hello");} # void g/;" method line:11 language:Vala
11 changes: 11 additions & 0 deletions Units/parser-vala.r/comments.vala.d/input.vala
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
void f1 () {
print ("hello");
}
// void g0 () { print ("hello");}
// void g1 () { print ("hello");}

void f2 () {print ("hello");} // void g3 () { print ("hello");}
void f3 () {print ("hello");} void g4 () { print ("hello");}
void f4 () {print ("hello"); // void g5 () { print ("hello");}
// void g6 () { print ("hello");}
} void g7 () { print ("hello");} // void g8 () {} ; void f5 () { print ("hello");} # void g9 () {}
2 changes: 2 additions & 0 deletions Units/parser-vala.r/functions.vala.d/args.ctags
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
--sort=no
--fields=+neKl
2 changes: 2 additions & 0 deletions Units/parser-vala.r/functions.vala.d/expected.tags
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
main input.vala /^void main(string[] args) {$/;" method line:4 language:Vala
sum input.vala /^int sum(int sum1, int sum2) {$/;" method line:8 language:Vala
10 changes: 10 additions & 0 deletions Units/parser-vala.r/functions.vala.d/input.vala
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/*
* vala sum
*/
void main(string[] args) {
print("Sum is: %d\n", sum(1,2));
}

int sum(int sum1, int sum2) {
return sum1 + sum2;
}
17 changes: 17 additions & 0 deletions Units/parser-vala.r/namespace.vala.d/expected.tags
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Address input.vala /^ class Address {$/;" c namespace:Data
Contact input.vala /^ class Contact {$/;" c namespace:Data.Private
Data input.vala /^namespace Data {$/;" n
Person input.vala /^class Person {$/;" c
Private input.vala /^ namespace Private {$/;" n namespace:Data
address input.vala /^ public Data.Address address {get; set;}$/;" p class:Person typeref:class:Data.Address
building input.vala /^ public int building;$/;" f class:Data.Address typeref:typename:int
city input.vala /^ public string city;$/;" f class:Data.Address typeref:typename:string
country input.vala /^ public string country;$/;" f class:Data.Address typeref:typename:string
d_street input.vala /^ public string d_street;$/;" f class:Data.Address typeref:typename:string
email input.vala /^ public string email;$/;" f class:Data.Private.Contact typeref:typename:string
floor input.vala /^ public int floor;$/;" f class:Data.Address typeref:typename:int
id input.vala /^ public string id;$/;" f class:Data.Private.Contact typeref:typename:string
main input.vala /^void main(string[] args) {$/;" m
name input.vala /^ public string name {get; set;}$/;" p class:Person typeref:typename:string
phone input.vala /^ public string phone;$/;" f class:Data.Private.Contact typeref:typename:string
street input.vala /^ public string street {$/;" p class:Data.Address typeref:typename:string
55 changes: 55 additions & 0 deletions Units/parser-vala.r/namespace.vala.d/input.vala
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
using Data;

void main(string[] args) {
var p = new Person();
var a = new Address();
a.street = "Oxford Street";
p.address = a;
p.name = "John";
p.age = 21;
print("Hello %s, you're %d years old\nliving in %s\n", p.name, p.age, p.address.street);
}

namespace Data {
class Address {
public string country;
public string city;
public string d_street;
public int building;
public int floor;

public string street {
owned get {
return d_street;
}
set {
d_street = value;
}
}
}

namespace Private {
class Contact {
public string email;
public string phone;
public string id;
}
}
}

class Person {
public Data.Address address {get; set;}
public string name {get; set;}
private int d_age;

public int age {
get { return d_age;}
set {
if (value > 0) {
d_age = value;
} else {
d_age = 0;
}
}
}
}
2 changes: 2 additions & 0 deletions Units/parser-vala.r/simple.vala.d/args.ctags
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
--sort=no
--fields=+neKl
1 change: 1 addition & 0 deletions Units/parser-vala.r/simple.vala.d/expected.tags
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
main input.vala /^void main(string[] args) {$/;" method line:4 language:Vala
6 changes: 6 additions & 0 deletions Units/parser-vala.r/simple.vala.d/input.vala
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/*
* vala HelloWorld
*/
void main(string[] args) {
print("Hello, World\n");
}
2 changes: 1 addition & 1 deletion main/parsers_p.h
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@
VeraParser, \
VerilogParser, \
SystemVerilogParser, \
VhdlParser, \
ValaParser, \
VhdlParser, \
VimParser, \
WindResParser, \
YaccParser, \
Expand Down
Loading