Added lexars
This commit is contained in:
parent
382b2ce94b
commit
f9f64b0558
820 changed files with 149371 additions and 0 deletions
lexers/testdata
47
lexers/testdata/monkeyc.actual
vendored
Normal file
47
lexers/testdata/monkeyc.actual
vendored
Normal file
|
@ -0,0 +1,47 @@
|
|||
using Toybox.Application as App;
|
||||
using Toybox.System;
|
||||
|
||||
const PI = 3.14;
|
||||
|
||||
class MyProjectApp extends App.AppBase {
|
||||
protected var y;
|
||||
|
||||
function initialize () {
|
||||
me.y = "Hello";
|
||||
self.y = "World";
|
||||
var x = add( 3, 4 );
|
||||
var array = new [x];
|
||||
|
||||
// Initialize the sub-arrays
|
||||
for( var i = 0; i < x; i += 1 ) {
|
||||
array[i] = new [5];
|
||||
}
|
||||
|
||||
var dict = { "a" => 1, "b" => 2 };
|
||||
var person = { :firstName=>"Bob", :lastName=>"Jones" };
|
||||
}
|
||||
|
||||
public function onStart(state) {
|
||||
var v = new Foo();
|
||||
var m = v.method(:op);
|
||||
m.invoke(1,2l);
|
||||
}
|
||||
|
||||
function getInitialView() {
|
||||
return [ new MyProjectView() ];
|
||||
}
|
||||
|
||||
function add( a, b ) {
|
||||
return a + b;
|
||||
}
|
||||
|
||||
function thisFunctionUsesAdd() {
|
||||
var a = add( 1, 0x03f ); // Return 4
|
||||
var b = add( "Hello ", "World" ); // Returns "Hello World"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class Foo {
|
||||
function op(a, b) {}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue