aboutsummaryrefslogtreecommitdiff
path: root/builder.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2012-12-23 18:54:53 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2012-12-23 18:54:53 +0200
commit99298c8f72efe8c6b287c69ec48e1dc3debed2e0 (patch)
treec1f6f2b169cccf986095c1d3b324310f9c11e515 /builder.py
parent26ee2483b5d6c50095d8f8a6ab2be518d3317aac (diff)
downloadmeson-99298c8f72efe8c6b287c69ec48e1dc3debed2e0.zip
meson-99298c8f72efe8c6b287c69ec48e1dc3debed2e0.tar.gz
meson-99298c8f72efe8c6b287c69ec48e1dc3debed2e0.tar.bz2
Detect braces.
Diffstat (limited to 'builder.py')
-rwxr-xr-xbuilder.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/builder.py b/builder.py
index 8e0ddd7..a46d52d 100755
--- a/builder.py
+++ b/builder.py
@@ -21,6 +21,8 @@ tokens = ['LPAREN',
'RPAREN',
'LBRACKET',
'RBRACKET',
+ 'LBRACE',
+ 'RBRACE',
'VARIABLE',
'COMMENT',
'EQUALS',
@@ -36,6 +38,8 @@ t_LPAREN = '\('
t_RPAREN = '\)'
t_LBRACKET = '\['
t_RBRACKET = '\]'
+t_LBRACE = '\{'
+t_RBRACE = '\}'
t_VARIABLE = '[a-zA-Z][_0-9a-zA-Z]*'
t_COMMENT = '\#[^\n]*'
t_COMMA = ','
@@ -53,7 +57,7 @@ def t_error(t):
def test_lexer():
s = """hello = (something) # this = (that)
two = ['file1', 'file2']
- function(h)
+ function(h) { stuff }
obj.method(lll, \\
'string')
"""