aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorBruce Hill <bitbucket@bruce-hill.com>2018-08-30 14:16:09 -0700
committerBruce Hill <bitbucket@bruce-hill.com>2018-08-30 14:16:18 -0700
commit18126da9c538046a93715d829722c818773b9ac1 (patch)
tree3a88e43636b85534ded21abd9f9f106b8ffbc037 /core
parentba00294badff9d5f5d55e1080a17b13fea961f55 (diff)
Auto-upgraded to 3.7
Diffstat (limited to 'core')
-rw-r--r--core/collections.nom8
-rw-r--r--core/control_flow.nom32
-rw-r--r--core/coroutines.nom2
-rw-r--r--core/errors.nom2
-rw-r--r--core/io.nom2
-rw-r--r--core/math.nom2
-rw-r--r--core/metaprogramming.nom2
-rw-r--r--core/operators.nom4
-rw-r--r--core/scopes.nom2
-rw-r--r--core/text.nom2
10 files changed, 30 insertions, 28 deletions
diff --git a/core/collections.nom b/core/collections.nom
index 938466d..9c7e8d0 100644
--- a/core/collections.nom
+++ b/core/collections.nom
@@ -1,4 +1,4 @@
-#!/usr/bin/env nomsu -V3.6.5.6
+#!/usr/bin/env nomsu -V3.7.5.6
#
This file contains code that supports manipulating and using collections like lists
and dictionaries.
@@ -11,10 +11,12 @@ use "core/operators.nom"
test:
%list = [1, 2, 3, 4, 5]
%visited = {}
- for %i = %x in %list: %visited.%i = (yes)
+ for %i = %x in %list:
+ %visited.%i = (yes)
assume (%visited == {1:yes, 2:yes, 3:yes, 4:yes, 5:yes})
%visited = {}
- for %x in %list: %visited.%x = (yes)
+ for %x in %list:
+ %visited.%x = (yes)
assume (%visited == {1:yes, 2:yes, 3:yes, 4:yes, 5:yes})
assume ((%list::2 nd to last) == 4)
assume ((%list::first) == 1)
diff --git a/core/control_flow.nom b/core/control_flow.nom
index 63601f7..a786f44 100644
--- a/core/control_flow.nom
+++ b/core/control_flow.nom
@@ -1,4 +1,4 @@
-#!/usr/bin/env nomsu -V3.6.5.6
+#!/usr/bin/env nomsu -V3.7.5.6
#
This file contains compile-time actions that define basic control flow structures
like "if" statements and loops.
@@ -300,7 +300,7 @@ compile [..]
%stop_labels::append "\n\(compile as (===stop %key ===))"
if (%body has subtree \(stop %value)):
%stop_labels::append "\n\(compile as (===stop %value ===))"
- if ((length of "\%stop_labels") > 0):
+ if ((size of "\%stop_labels") > 0):
%lua = (..)
Lua ".."
do -- scope for stopping for % = % loop
@@ -332,18 +332,18 @@ compile [if %body, when %body] to:
compile error at %body.source "'if' expected a Block, but got: %s"
for %line in %body:
unless (..)
- ((%line.type is "Action") and ((length of %line) >= 2)) and (..)
- %line.(length of %line) is "Block" syntax tree
+ ((%line.type is "Action") and ((size of %line) >= 2)) and (..)
+ %line.(size of %line) is "Block" syntax tree
..:
compile error at %line.source ".."
Invalid line for 'if', each line should contain conditional expressions followed by a block, or "else" followed by a block:
%s
- %action = %line.(length of %line)
- if ((%line.1 is "else") and ((length of %line) == 2)):
+ %action = %line.(size of %line)
+ if ((%line.1 is "else") and ((size of %line) == 2)):
unless %else_allowed:
compile error at %line.source "Can't have two 'else' blocks"
- unless ((length of "\%code") > 0):
+ unless ((size of "\%code") > 0):
compile error at %line.source ".."
Can't have an 'else' block without a preceeding condition
@@ -355,7 +355,7 @@ compile [if %body, when %body] to:
%else_allowed = (no)
..else:
%code::append "\%clause "
- for %i in 1 to ((length of %line) - 1):
+ for %i in 1 to ((size of %line) - 1):
unless (%line.%i is syntax tree):
compile error at %line.source ".."
Invalid condition for 'if' statement:
@@ -371,7 +371,7 @@ compile [if %body, when %body] to:
%clause = "\nelseif"
- if ((length of "\%code") == 0):
+ if ((size of "\%code") == 0):
compile error at %body.source "'if' block has an empty body"
%code::append "\nend --when"
return %code
@@ -395,18 +395,18 @@ compile [if %branch_value is %body, when %branch_value is %body] to:
compile error at %body.source "'if' expected a Block, but got: %s"
for %line in %body:
unless (..)
- ((%line.type is "Action") and ((length of %line) >= 2)) and (..)
- %line.(length of %line) is "Block" syntax tree
+ ((%line.type is "Action") and ((size of %line) >= 2)) and (..)
+ %line.(size of %line) is "Block" syntax tree
..:
compile error at %line.source ".."
Invalid line for 'if % is % %', each line should contain expressions followed by a block, or "else" followed by a block:
%s
- %action = %line.(length of %line)
- if ((%line.1 is "else") and ((length of %line) == 2)):
+ %action = %line.(size of %line)
+ if ((%line.1 is "else") and ((size of %line) == 2)):
unless %else_allowed:
compile error at %line.source "Can't have two 'else' blocks"
- unless ((length of "\%code") > 0):
+ unless ((size of "\%code") > 0):
compile error at %line.source ".."
Can't have an 'else' block without a preceeding condition
@@ -418,7 +418,7 @@ compile [if %branch_value is %body, when %branch_value is %body] to:
%else_allowed = (no)
..else:
%code::append "\%clause "
- for %i in 1 to ((length of %line) - 1):
+ for %i in 1 to ((size of %line) - 1):
unless (%line.%i is syntax tree):
compile error at %line.source ".."
Invalid condition for 'if' statement:
@@ -434,7 +434,7 @@ compile [if %branch_value is %body, when %branch_value is %body] to:
%clause = "\nelseif"
- if ((length of "\%code") == 0):
+ if ((size of "\%code") == 0):
compile error at %body.source "'if % is % %' block has an empty body"
%code::append "\nend --when"
return (..)
diff --git a/core/coroutines.nom b/core/coroutines.nom
index 80f3b60..753a2ef 100644
--- a/core/coroutines.nom
+++ b/core/coroutines.nom
@@ -1,4 +1,4 @@
-#!/usr/bin/env nomsu -V3.6.5.6
+#!/usr/bin/env nomsu -V3.7.5.6
#
This file defines the code that creates and manipulates coroutines
diff --git a/core/errors.nom b/core/errors.nom
index 932bb25..874f2fe 100644
--- a/core/errors.nom
+++ b/core/errors.nom
@@ -1,4 +1,4 @@
-#!/usr/bin/env nomsu -V3.6.5.6
+#!/usr/bin/env nomsu -V3.7.5.6
#
This file contains basic error reporting code
diff --git a/core/io.nom b/core/io.nom
index 856a660..e47554f 100644
--- a/core/io.nom
+++ b/core/io.nom
@@ -1,4 +1,4 @@
-#!/usr/bin/env nomsu -V3.6.5.6
+#!/usr/bin/env nomsu -V3.7.5.6
#
This file contains basic input/output code
diff --git a/core/math.nom b/core/math.nom
index 778994f..6a205b6 100644
--- a/core/math.nom
+++ b/core/math.nom
@@ -1,4 +1,4 @@
-#!/usr/bin/env nomsu -V3.6.5.6
+#!/usr/bin/env nomsu -V3.7.5.6
#
This file defines some common math literals and functions
diff --git a/core/metaprogramming.nom b/core/metaprogramming.nom
index 3657e02..0f894b8 100644
--- a/core/metaprogramming.nom
+++ b/core/metaprogramming.nom
@@ -1,4 +1,4 @@
-#!/usr/bin/env nomsu -V3.6.5.6
+#!/usr/bin/env nomsu -V3.7.5.6
#
This File contains actions for making actions and compile-time actions and some helper
functions to make that easier.
diff --git a/core/operators.nom b/core/operators.nom
index 863ebc8..7e30705 100644
--- a/core/operators.nom
+++ b/core/operators.nom
@@ -1,4 +1,4 @@
-#!/usr/bin/env nomsu -V3.6.5.6
+#!/usr/bin/env nomsu -V3.7.5.6
#
This file contains definitions of operators like "+" and "and".
@@ -286,7 +286,7 @@ compile [not %] to (Lua value "(not \(% as lua expr))")
test:
assume ((size of [1, 2, 3]) == 3)
-compile [size of %list, length of %list, len %list, || %list ||] to (..)
+compile [size of %list, size of %list, size of %list, size of %list] to (..)
Lua value "(#\(%list as lua expr))"
compile [%list is empty] to (Lua value "(#\(%list as lua expr) == 0)")
diff --git a/core/scopes.nom b/core/scopes.nom
index 392649b..6ee2939 100644
--- a/core/scopes.nom
+++ b/core/scopes.nom
@@ -1,4 +1,4 @@
-#!/usr/bin/env nomsu -V3.6.5.6
+#!/usr/bin/env nomsu -V3.7.5.6
#
This file contains definitions pertaining to variable scoping
diff --git a/core/text.nom b/core/text.nom
index 3cc979c..0232b7d 100644
--- a/core/text.nom
+++ b/core/text.nom
@@ -1,4 +1,4 @@
-#!/usr/bin/env nomsu -V3.6.5.6
+#!/usr/bin/env nomsu -V3.7.5.6
#
This file contains some definitions of text escape sequences, including ANSI console
color codes.