Commits

Victor Kotseruba  committed 9a560af

":prop = value" schema

  • Participants
  • Parent commits a6edc33

Comments (0)

Files changed (2)

     mixin_def_re = re.compile(r'^=(?P<name>[\.\w-]+)(?:\((?P<args>[^\)]+)\))?')
     mixin_use_re = re.compile(r'^\s*\+(?P<name>[\.\w-]+)(?:\((?P<args>[^\)]+)\))?')
     var_def_re = re.compile(r'^!(?P<name>[\.\w-]+)\s*(?P<optional>(?:\|\|)?)=\s*(?P<value>.+?)\s*$')
-    property_re = re.compile(r'^\s+(?P<key>(?::[\w-]+|[\w-]+(?::|\s+=)))\s+(?P<value>.+?)\s*$')
+    property_re = re.compile(r'^\s+(?P<key>(?::?[\w-]+(?::|\s+=)|:[\w-]+))\s+(?P<value>.+?)\s*$')
     prop_prefix_re = re.compile(r'^\s+(?P<prefix>(?::[\w-]+|[\w-]+:))\s*$')
     tabstop = 2
     
 
 =box-font(!size)
-  font-size = !size / 5
+  :font-size = !size / 5
 
 =square(!width)
-  width = !width
-  height = !width
-  padding = !width / 10
-  margin = (!width / (20 - 1)) 0 0 0
+  :width = !width
+  :height = !width
+  :padding = !width / 10
+  :margin = !width / 20 - 1px 0 0 0
   +box-font(!width)
 
 .box
-  +square(100px)
+  +square(100px)