Allow variable-names beginning with a number

This commit is contained in:
jtm
2012-04-10 17:41:59 +00:00
parent 76d00f8bf6
commit 5a044e3627
5 changed files with 16 additions and 1 deletions

View File

@@ -140,6 +140,10 @@ class LessLexer:
t.value = t.value.strip()
return t
def t_less_variable(self, t):
r'@\w+'
return t
def t_css_color(self, t):
r'\#[0-9]([0-9a-f]{5}|[0-9a-f]{2})'
return t

View File

@@ -48,3 +48,6 @@
border-right: 1px solid transparent;
border-top: 1px solid black;
}
.testname {
width: 12px;
}

View File

@@ -11,3 +11,4 @@
.scope1 .scope2 .scope3 .scope4{color:black;}
.negvar{padding:-1px;}
.varpad{border-left:1px solid transparent;border-right:1px solid transparent;border-top:1px solid black;}
.testname{width:12px;}

View File

@@ -133,4 +133,4 @@ footer, header, hgroup, menu, nav, section {
@var: 3;
(~".class_no_@{var}") {
padding: @var * -1px;
}
}

View File

@@ -96,3 +96,10 @@
border-right: @a solid transparent;
border-top: @a solid black;
}
/*
Names
*/
@1col: 12px;
.testname {
width: @1col;
}