projects
/
platform
/
framework
/
web
/
crosswalk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git]
/
src
/
third_party
/
WebKit
/
Source
/
build
/
scripts
/
make_mediaquery_tokenizer_codepoints.py
diff --git
a/src/third_party/WebKit/Source/build/scripts/make_mediaquery_tokenizer_codepoints.py
b/src/third_party/WebKit/Source/build/scripts/make_mediaquery_tokenizer_codepoints.py
index
86af663
..
69a96f7
100755
(executable)
--- a/
src/third_party/WebKit/Source/build/scripts/make_mediaquery_tokenizer_codepoints.py
+++ b/
src/third_party/WebKit/Source/build/scripts/make_mediaquery_tokenizer_codepoints.py
@@
-28,9
+28,14
@@
const unsigned codePointsNumber = {array_size};
def token_type(i):
codepoints = {'(': 'leftParenthesis',
')': 'rightParenthesis',
def token_type(i):
codepoints = {'(': 'leftParenthesis',
')': 'rightParenthesis',
+ '[': 'leftBracket',
+ ']': 'rightBracket',
+ '{': 'leftBrace',
+ '}': 'rightBrace',
'+': 'plusOrFullStop',
'.': 'plusOrFullStop',
'-': 'hyphenMinus',
'+': 'plusOrFullStop',
'.': 'plusOrFullStop',
'-': 'hyphenMinus',
+ '*': 'asterisk',
',': 'comma',
'/': 'solidus',
'\\': 'reverseSolidus',
',': 'comma',
'/': 'solidus',
'\\': 'reverseSolidus',
@@
-38,6
+43,7
@@
def token_type(i):
';': 'semiColon',
}
whitespace = '\n\r\t\f '
';': 'semiColon',
}
whitespace = '\n\r\t\f '
+ quotes = '"\''
c = chr(i)
if c in whitespace:
return 'whiteSpace'
c = chr(i)
if c in whitespace:
return 'whiteSpace'
@@
-45,6
+51,8
@@
def token_type(i):
return 'asciiDigit'
if c.isalpha() or c == '_':
return 'nameStart'
return 'asciiDigit'
if c.isalpha() or c == '_':
return 'nameStart'
+ if c in quotes:
+ return 'stringStart'
if i == 0:
return 'endOfFile'
return codepoints.get(c)
if i == 0:
return 'endOfFile'
return codepoints.get(c)