novos testes e new line mal feito
This commit is contained in:
parent
b79540bab8
commit
e3a0ea5bf1
3 changed files with 9 additions and 6 deletions
|
@ -75,12 +75,11 @@ contributors = [
|
|||
]
|
||||
|
||||
[fruie]
|
||||
apple.color = "red"
|
||||
apple.taste.sweet = true
|
||||
|
||||
[fruie.apple.color]
|
||||
test="oi"
|
||||
[fruie.apple.taste]
|
||||
test={"oi" = 14}
|
||||
[fruie.apple.color.test]
|
||||
test2="oi"
|
||||
|
||||
[fruie.apple.texture] # you can add sub-tables
|
||||
|
|
|
@ -16,8 +16,12 @@ tokens = [
|
|||
"INF",
|
||||
"NAN",
|
||||
"COMMENT",
|
||||
"NEWLINE",
|
||||
]
|
||||
|
||||
def t_NEWLINE(t):
|
||||
r"\n+\s*"
|
||||
return t
|
||||
|
||||
# needs to check if datetime is valid
|
||||
def t_DATETIME(t):
|
||||
|
@ -115,7 +119,7 @@ def t_error(t):
|
|||
t.lexer.skip(1)
|
||||
|
||||
|
||||
t_ignore = "\n\t "
|
||||
t_ignore = "\t "
|
||||
|
||||
literals = "[]{},="
|
||||
|
||||
|
|
|
@ -16,11 +16,11 @@ def p_content_single(p):
|
|||
|
||||
|
||||
def p_tomlEntries_table(p):
|
||||
"""tomlEntries : table"""
|
||||
"""tomlEntries : table NEWLINE"""
|
||||
|
||||
|
||||
def p_tomlEntries_object(p):
|
||||
"""tomlEntries : object"""
|
||||
"""tomlEntries : object NEWLINE"""
|
||||
|
||||
|
||||
def p_table_simple(p):
|
||||
|
|
Loading…
Reference in a new issue