Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding vala support #284

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ The default 5 can be modified to change the colors, and more can be added.
* Twig
* TypeScript
* TypeScript React
* Vala
* Verilog
* Visual Basic
* Vue.js
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@
"onLanguage:twig",
"onLanguage:typescript",
"onLanguage:typescriptreact",
"onLanguage:vala",
"onLanguage:vb",
"onLanguage:verilog",
"onLanguage:vue",
Expand Down
1 change: 1 addition & 0 deletions src/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,7 @@ export class Parser {
case "shaderlab":
case "stylus":
case "swift":
case "vala":
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The indentation seems wrong here

case "verilog":
case "vue":
this.setCommentFormat("//", "/*", "*/");
Expand Down
31 changes: 31 additions & 0 deletions src/test/samples/vala.vala
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/**
* Demo HelloWorld to print to stdout.
*/
class Demo.HelloWorld : GLib.Object {

/**
* Property Name.
*
* TODO: Add Verification.
*/
public string name { get; set; }

/**
* This method supposed to do something usefull.
aeldemery marked this conversation as resolved.
Show resolved Hide resolved
*
* If test equals some value it should return true otherwise false.
*
* @param test The required parameter.
* @throws Error on failure.
*/
public bool do_something (string test) throws GLib.Error {
return true;
}

public static int main (string[] args) {

stdout.printf ("Hello, World\n");

return 0;
}
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing final newline