Commit 324f8f14 authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Let the parser fix empty string types

parent ddba2fa6
......@@ -1806,11 +1806,14 @@ def primary(root, context):
# and also in value notation of SEQUENCEs that have no fields
prim = ogAST.PrimEmptyString()
prim.value = []
prim.exprType = type('PrES', (object,), {
'kind': 'SequenceOfType',
'Min': '0',
'Max': '0'
})
prim.exprType = UNKNOWN_TYPE
# Let fix_expression_type resolve this type
# prim.exprType = type('PrES', (object,), {
# 'kind': 'SequenceOfType',
# 'Min': '0',
# 'Max': '0',
# 'type': UNKNOWN_TYPE
# })
elif root.type == lexer.CHOICE:
prim = ogAST.PrimChoiceItem()
choice = root.getChild(0).toString()
......@@ -1826,7 +1829,7 @@ def primary(root, context):
if elem.type == lexer.ID:
field_name = elem.text
else:
prim.value[field_name], err, warn = (expression(elem, context))
prim.value[field_name], err, warn = expression(elem, context)
errors.extend(err)
warnings.extend(warn)
prim.exprType = UNKNOWN_TYPE
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment