aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBruce Hill <bitbucket@bruce-hill.com>2018-07-15 19:41:22 -0700
committerBruce Hill <bitbucket@bruce-hill.com>2018-07-15 19:43:28 -0700
commitbe06fc096aa28358914bd6a76b4ea380a04b8873 (patch)
tree1f6c300bc8fbeb6cd84008124fca1e43f5513616 /lib
parent8a44869c4a548692a19afe5258e2540f7d351c8a (diff)
Major changes to how versioning and parsing work. This should be a
better path going forward to handling upgrades. Old syntax files will stick around for compatibility purposes. Old syntax can be parsed into valid syntax trees via the old syntax (.peg) files, and then old syntax trees should be valid and can be upgraded via the normal code path. This change has lots of improvements to Nomsu codegen too.
Diffstat (limited to 'lib')
-rw-r--r--lib/consolecolor.nom5
-rw-r--r--lib/file_hash.nom4
-rw-r--r--lib/object.nom1
-rw-r--r--lib/os.nom4
-rw-r--r--lib/training_wheels.nom1
-rw-r--r--lib/version.nom2
6 files changed, 17 insertions, 0 deletions
diff --git a/lib/consolecolor.nom b/lib/consolecolor.nom
index 8e3ca2f..3e325d6 100644
--- a/lib/consolecolor.nom
+++ b/lib/consolecolor.nom
@@ -1,3 +1,7 @@
+#!/usr/bin/env nomsu -V1
+#
+ This file defines actions for ANSI console color escape codes.
+
use "core"
test: bright: "\(green)Color test passed."
@@ -12,6 +16,7 @@ test: bright: "\(green)Color test passed."
for %name = %colornum in %colors
with {%escapecode: "\27[\(%colornum)m"}
run ".."
+ #!/usr/bin/env nomsu -V1
compile [\%name] to: Lua value (quote \(quote %escapecode))
compile [\%name %text] to
Lua value ".."
diff --git a/lib/file_hash.nom b/lib/file_hash.nom
index 1f263de..9882481 100644
--- a/lib/file_hash.nom
+++ b/lib/file_hash.nom
@@ -1,3 +1,7 @@
+#!/usr/bin/env nomsu -V1
+#
+ This file defines some actions for hashing files and looking up files by hash.
+
use "core"
action [file with hash %hash]
diff --git a/lib/object.nom b/lib/object.nom
index 5f12170..45f7551 100644
--- a/lib/object.nom
+++ b/lib/object.nom
@@ -1,3 +1,4 @@
+#!/usr/bin/env nomsu -V1
#
This file contains the implementation of an Object-Oriented programming system.
diff --git a/lib/os.nom b/lib/os.nom
index ee8b79b..329a77f 100644
--- a/lib/os.nom
+++ b/lib/os.nom
@@ -1,3 +1,7 @@
+#!/usr/bin/env nomsu -V1
+#
+ This file defines some actions that interact with the operating system and filesystem.
+
use "core"
action [path of Nomsu file %filename]
diff --git a/lib/training_wheels.nom b/lib/training_wheels.nom
index 19625bc..970265c 100644
--- a/lib/training_wheels.nom
+++ b/lib/training_wheels.nom
@@ -1,3 +1,4 @@
+#!/usr/bin/env nomsu -V1
#
This file contains a set of definitions that bring some familiar language features
from other languages into nomsu (e.g. "==" and "continue")
diff --git a/lib/version.nom b/lib/version.nom
index 3e9a29d..f90a39c 100644
--- a/lib/version.nom
+++ b/lib/version.nom
@@ -1 +1,3 @@
+#!/usr/bin/env nomsu -V1
+# This file sets the current library version.
lua> "NOMSU_LIB_VERSION = 3"