diff --git a/CMakeFiles/laszlo.dir/build.make b/CMakeFiles/laszlo.dir/build.make index dd52c94..6e20c7f 100644 --- a/CMakeFiles/laszlo.dir/build.make +++ b/CMakeFiles/laszlo.dir/build.make @@ -208,6 +208,7 @@ src/laszlo.html: src/CMakeFiles/laszlo.dir/objects1.rsp src/laszlo.html: src/CMakeFiles/laszlo.dir/link.txt @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --green --bold --progress-dir=/home/runner/work/laszlo/laszlo/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_9) "Linking CXX executable laszlo.html" cd /home/runner/work/laszlo/laszlo/build/src && $(CMAKE_COMMAND) -E cmake_link_script CMakeFiles/laszlo.dir/link.txt --verbose=$(VERBOSE) + cd /home/runner/work/laszlo/laszlo/build/src && /usr/local/bin/cmake -E copy /home/runner/work/laszlo/laszlo/emscripten/mode-laszlo.js /home/runner/work/laszlo/laszlo/build/src/mode-laszlo.js # Rule to build all files generated by this target. src/CMakeFiles/laszlo.dir/build: src/laszlo.html diff --git a/CMakeFiles/laszlo.dir/link.txt b/CMakeFiles/laszlo.dir/link.txt index 264d872..64e240c 100644 --- a/CMakeFiles/laszlo.dir/link.txt +++ b/CMakeFiles/laszlo.dir/link.txt @@ -1 +1 @@ -/home/runner/work/laszlo/laszlo/emsdk/upstream/emscripten/em++ -fexperimental-library --preload-file /home/runner/work/laszlo/laszlo/asset_dir/test.las@programs/ --shell-file /home/runner/work/laszlo/laszlo/emscripten/shell.html -sEXPORTED_FUNCTIONS=_main -fexceptions @CMakeFiles/laszlo.dir/objects1.rsp -o laszlo.html +/home/runner/work/laszlo/laszlo/emsdk/upstream/emscripten/em++ -fexperimental-library --preload-file /home/runner/work/laszlo/laszlo/asset_dir/test.las@programs/ -fexceptions --shell-file /home/runner/work/laszlo/laszlo/emscripten/shell.html -sEXPORTED_FUNCTIONS=_main -sNO_EXIT_RUNTIME @CMakeFiles/laszlo.dir/objects1.rsp -o laszlo.html diff --git a/CMakeFiles/laszlo.dir/main.cpp.o b/CMakeFiles/laszlo.dir/main.cpp.o index 33dce33..7ae593d 100644 Binary files a/CMakeFiles/laszlo.dir/main.cpp.o and b/CMakeFiles/laszlo.dir/main.cpp.o differ diff --git a/CMakeFiles/laszlo.dir/main.cpp.o.d b/CMakeFiles/laszlo.dir/main.cpp.o.d index d2bb52b..4a21ee9 100644 --- a/CMakeFiles/laszlo.dir/main.cpp.o.d +++ b/CMakeFiles/laszlo.dir/main.cpp.o.d @@ -579,4 +579,6 @@ src/CMakeFiles/laszlo.dir/main.cpp.o: \ /home/runner/work/laszlo/laszlo/src/source_location.hpp \ /home/runner/work/laszlo/laszlo/src/parser_error.hpp \ /home/runner/work/laszlo/laszlo/src/runtime_error.hpp \ - /home/runner/work/laszlo/laszlo/emsdk/upstream/emscripten/cache/sysroot/include/c++/v1/fstream + /home/runner/work/laszlo/laszlo/emsdk/upstream/emscripten/cache/sysroot/include/c++/v1/fstream \ + /home/runner/work/laszlo/laszlo/emsdk/upstream/emscripten/cache/sysroot/include/c++/v1/map \ + /home/runner/work/laszlo/laszlo/emsdk/upstream/emscripten/cache/sysroot/include/c++/v1/__tree diff --git a/CMakeFiles/laszlo.dir/parser.cpp.o b/CMakeFiles/laszlo.dir/parser.cpp.o index 2de01f4..da1402e 100644 Binary files a/CMakeFiles/laszlo.dir/parser.cpp.o and b/CMakeFiles/laszlo.dir/parser.cpp.o differ diff --git a/index.html b/index.html index f6e6b9f..48a5d93 100644 --- a/index.html +++ b/index.html @@ -5,80 +5,121 @@ Laszlo -
- + + + +
function main() { + println("Hello from Laszlo!"); +} + +main(); +


-
emscripten
-
Downloading...
-
- -
- +
+
+
emscripten
+
+
Downloading...
+
+ +

diff --git a/laszlo.wasm b/laszlo.wasm index fe76248..b9e7d65 100755 Binary files a/laszlo.wasm and b/laszlo.wasm differ diff --git a/mode-laszlo.js b/mode-laszlo.js new file mode 100644 index 0000000..86a0aee --- /dev/null +++ b/mode-laszlo.js @@ -0,0 +1,32 @@ +define(function(require, exports, module) { + var oop = require("ace/lib/oop"); + var TextMode = require("ace/mode/text").Mode; + var TextHighlightRules = require("ace/mode/text_highlight_rules").TextHighlightRules; + + var MyLanguageHighlightRules = function() { + this.$rules = { + "start": [ + { + token: "keyword", + regex: "\\b(?:Array|Bool|Function|I32|Range|String|and|assert|break|continue|else|false|for|function|if|in|let|mod|or|println|print|return|true|typeof|while)" + }, + { + token : "string", // single line + regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' + }, + { + token : "comment", + regex : "//.*$" + } + ] + }; + }; + oop.inherits(MyLanguageHighlightRules, TextHighlightRules); + + var MyLanguageMode = function() { + this.HighlightRules = MyLanguageHighlightRules; + }; + oop.inherits(MyLanguageMode, TextMode); + + module.exports = MyLanguageMode; +});