Added lexars
This commit is contained in:
parent
382b2ce94b
commit
f9f64b0558
820 changed files with 149371 additions and 0 deletions
lexers/testdata
42
lexers/testdata/vala.actual
vendored
Normal file
42
lexers/testdata/vala.actual
vendored
Normal file
|
@ -0,0 +1,42 @@
|
|||
class HelloWorld: Object {
|
||||
|
||||
public signal void some_event ();
|
||||
|
||||
public void method () {
|
||||
some_event ();
|
||||
}
|
||||
|
||||
struct Vector {
|
||||
public double x;
|
||||
public double y;
|
||||
public double z;
|
||||
}
|
||||
|
||||
enum WindowType {
|
||||
TOPLEVEL,
|
||||
POPUP
|
||||
}
|
||||
|
||||
private uint year = 0;
|
||||
|
||||
public HelloWorld () {
|
||||
}
|
||||
|
||||
public HelloWorld.with_year (int year) {
|
||||
if (year>0)
|
||||
this.year = year;
|
||||
}
|
||||
|
||||
public void greeting () {
|
||||
if (year == 0)
|
||||
print ("Hello World\n");
|
||||
else
|
||||
/* Strings prefixed with '@' are string templates. */
|
||||
print (@"Hello World, $(this.year)\n");
|
||||
}
|
||||
}
|
||||
|
||||
void main (string[] args) {
|
||||
var helloworld = new HelloWorld.with_year (2021);
|
||||
helloworld.greeting ();
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue