Skip to content
Snippets Groups Projects
Commit 1f348610 authored by Tomáš Orviský's avatar Tomáš Orviský
Browse files

Extended skinparam lexing and parsing

parent 6a14f610
Branches
No related merge requests found
...@@ -172,7 +172,11 @@ class PUMLexer(object): ...@@ -172,7 +172,11 @@ class PUMLexer(object):
@staticmethod @staticmethod
def t_SKINPARAM(t): def t_SKINPARAM(t):
r"""skinparam\s+.+""" r"""skinparam\s+(\w+)\s+(\w+)?"""
target = t.lexer.lexmatch.group(32)
value = t.lexer.lexmatch.group(33)
t.value = (target, value)
return t return t
def t_IDENTIFIER(self, t): def t_IDENTIFIER(self, t):
......
...@@ -362,7 +362,12 @@ class PUMLParser(object): ...@@ -362,7 +362,12 @@ class PUMLParser(object):
""" """
skinparam : SKINPARAM skinparam : SKINPARAM
""" """
skinparam = p[1].split(" ")[1::]
@staticmethod
def p_skinparam_with_body(p):
"""
skinparam : SKINPARAM IN_BRACKETS_LINES
"""
@staticmethod @staticmethod
def p_error(p): def p_error(p):
......
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