Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mincss
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Taddeüs Kroes
mincss
Commits
71ae054f
Commit
71ae054f
authored
Jul 21, 2014
by
Taddeüs Kroes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added some lowercase casts to parser for input normalization
parent
20418d8e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
parser.mly
parser.mly
+3
-3
No files found.
parser.mly
View file @
71ae054f
...
@@ -270,9 +270,9 @@ term:
...
@@ -270,9 +270,9 @@ term:
|
op
=
unary_operator
v
=
numval
S
*
{
unary_number
(
Unary
(
op
,
v
))
}
|
op
=
unary_operator
v
=
numval
S
*
{
unary_number
(
Unary
(
op
,
v
))
}
|
v
=
numval
S
*
{
v
}
|
v
=
numval
S
*
{
v
}
|
str
=
STRING
S
*
{
Strlit
str
}
|
str
=
STRING
S
*
{
Strlit
str
}
|
id
=
IDENT
S
*
{
Ident
id
}
|
id
=
IDENT
S
*
{
Ident
(
String
.
lowercase
id
)
}
|
uri
=
URI
S
*
{
Uri
uri
}
|
uri
=
URI
S
*
{
Uri
uri
}
|
fn
=
FUNCTION
arg
=
expr
RPAREN
S
*
{
Function
(
fn
,
arg
)
}
|
fn
=
FUNCTION
arg
=
expr
RPAREN
S
*
{
Function
(
String
.
lowercase
fn
,
arg
)
}
|
hex
=
HASH
S
*
|
hex
=
HASH
S
*
{
let
h
=
"[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]"
in
{
let
h
=
"[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]"
in
if
Str
.
string_match
(
Str
.
regexp
(
"^"
^
h
^
"
\\
("
^
h
^
"
\\
)?$"
))
hex
0
if
Str
.
string_match
(
Str
.
regexp
(
"^"
^
h
^
"
\\
("
^
h
^
"
\\
)?$"
))
hex
0
...
@@ -283,5 +283,5 @@ unary_operator:
...
@@ -283,5 +283,5 @@ unary_operator:
|
PLUS
{
"+"
}
|
PLUS
{
"+"
}
%
inline
numval
:
%
inline
numval
:
|
n
=
NUMBER
{
Number
(
n
,
None
)
}
|
n
=
NUMBER
{
Number
(
n
,
None
)
}
|
v
=
UNIT_VALUE
{
let
n
,
u
=
v
in
Number
(
n
,
Some
u
)
}
|
v
=
UNIT_VALUE
{
let
n
,
u
=
v
in
Number
(
n
,
Some
(
String
.
lowercase
u
)
)
}
|
n
=
PERCENTAGE
{
Number
(
n
,
Some
"%"
)
}
|
n
=
PERCENTAGE
{
Number
(
n
,
Some
"%"
)
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment