Added lexars

This commit is contained in:
Toastie 2025-03-22 20:46:00 +13:00
parent 382b2ce94b
commit f9f64b0558
Signed by: toastie_t0ast
GPG key ID: 0861BE54AD481DC7
820 changed files with 149371 additions and 0 deletions
lexers/testdata

42
lexers/testdata/vala.actual vendored Normal file
View 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 ();
}