keywords as values in decl parameters
authorVolker Birk <vb@pep.foundation>
Wed, 29 Aug 2018 23:53:10 +0200
changeset 20 c936066cff62
parent 19 8903f9e692b9
child 21 5df774142d74
keywords as values in decl parameters
backend.py
heading.en.yhtml2
standardlib.ysl2
yml2.py
yml2c
yml2proc
--- a/backend.py	Thu Apr 26 19:26:19 2018 +0200
+++ b/backend.py	Wed Aug 29 23:53:10 2018 +0200
@@ -1,4 +1,4 @@
-# 2.5.6 backend
+# 2.5.8 backend
 
 # written by VB.
 
@@ -232,6 +232,8 @@
 
     def addValue(self, parm, value):
         if type(value) is str or type(value) is unicode:
+            if value[0] != "'" and value[0] != '"':
+                value = "'" + value + "'"
             self.values[parm] = u(evalPython(value))
         else:
             self.values[parm] = u(evalPython(u(value)))
--- a/heading.en.yhtml2	Thu Apr 26 19:26:19 2018 +0200
+++ b/heading.en.yhtml2	Wed Aug 29 23:53:10 2018 +0200
@@ -13,7 +13,7 @@
 div id=headline {
     p > YML – Why a Markup Language?!
     div class=small {
-        "YML 2.5.7 of Do 26 Apr 2018  –  Copyleft 2007-2018, "
+        "YML 2.5.8 of We 29 Aug 2018  –  Copyleft 2007-2018, "
         a "http://blog.fdik.org", "Volker Birk";
         " – "
         a "http://fdik.org/yml2.tar.bz2", "Download YML 2";
--- a/standardlib.ysl2	Thu Apr 26 19:26:19 2018 +0200
+++ b/standardlib.ysl2	Wed Aug 29 23:53:10 2018 +0200
@@ -1,3 +1,5 @@
+// YML2 standardlib version 2.5.8
+
 function "yml:hex2dec" {
     param "hex";
     param "_result", 0;
--- a/yml2.py	Thu Apr 26 19:26:19 2018 +0200
+++ b/yml2.py	Wed Aug 29 23:53:10 2018 +0200
@@ -1,4 +1,4 @@
-# YML 2.5.6 language definition
+# YML 2.5.8 language definition
 
 # written by VB.
 
@@ -66,7 +66,7 @@
 parm_eq.__name__ = "parm"
 _func = [symbol, ppointer, pointer, reference], _if(newSyntax, (-1, ("[", listing(parm), "]"))), 0, ("(", listing(parm), ")"), 0, listing(parm), -1, parm_eq
 def pythonCall():   return keyword("python"), _func, [";", "."]
-def declParm():     return [pointer, macro, xmlSymbol], 0, ("=", literal)
+def declParm():     return [pointer, macro, xmlSymbol], 0, ("=", [literal, symbol])
 def alias():        return keyword("alias"), aliasSymbol
 def descend():      return r(r"[+@*]" + _symbol, re.U)
 def base():         return keyword("is"), symbol
--- a/yml2c	Thu Apr 26 19:26:19 2018 +0200
+++ b/yml2c	Wed Aug 29 23:53:10 2018 +0200
@@ -2,7 +2,7 @@
 # vim: set fileencoding=utf-8 :
 
 """\
-YML 2 compiler version 5.5
+YML 2 compiler version 5.8
 Copyleft (c), 2009-2011, Volker Birk  http://fdik.org/yml/
 
 """
--- a/yml2proc	Thu Apr 26 19:26:19 2018 +0200
+++ b/yml2proc	Wed Aug 29 23:53:10 2018 +0200
@@ -2,7 +2,7 @@
 # vim: set fileencoding=utf-8 :
 
 """\
-YML/YSLT 2 processor version 5.5
+YML/YSLT 2 processor version 5.8
 Copyleft (c), 2009-2011 Volker Birk  http://fdik.org/yml/
 
 """