From be06fc096aa28358914bd6a76b4ea380a04b8873 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sun, 15 Jul 2018 19:41:22 -0700 Subject: 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. --- lib/consolecolor.nom | 5 +++++ lib/file_hash.nom | 4 ++++ lib/object.nom | 1 + lib/os.nom | 4 ++++ lib/training_wheels.nom | 1 + lib/version.nom | 2 ++ 6 files changed, 17 insertions(+) (limited to 'lib') 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" -- cgit v1.2.3