From a8d10443ead2f3af46b1ecb54b55dbafa1fa2a5c Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Fri, 5 Jan 2018 02:38:29 +0100 Subject: [PATCH] Pingu! --- compiler/api/compiler.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/compiler/api/compiler.py b/compiler/api/compiler.py index 88966bf2..1cfdb437 100644 --- a/compiler/api/compiler.py +++ b/compiler/api/compiler.py @@ -29,6 +29,7 @@ COMBINATOR_RE = re.compile(r"^([\w.]+)#([0-9a-f]+)\s(?:.*)=\s([\w<>.]+);$", re.M ARGS_RE = re.compile("[^{](\w+):([\w?!.<>]+)") FLAGS_RE = re.compile(r"flags\.(\d+)\?") FLAGS_RE_2 = re.compile(r"flags\.(\d+)\?([\w<>.]+)") +FLAGS_RE_3 = re.compile(r"flags:#") core_types = ["int", "long", "int128", "int256", "double", "bytes", "string", "Bool"] @@ -109,13 +110,8 @@ def start(): namespace, name = name.split(".") if "." in name else ("", name) args = ARGS_RE.findall(line) - # Check if combinator has flags - for i in args: - if FLAGS_RE.match(i[1]): - has_flags = True - break - else: - has_flags = False + # Pingu! + has_flags = not not FLAGS_RE_3.findall(line) # Fix file and folder name collision if name == "updates":