diff options
Diffstat (limited to 'src/mem/slicc/ast/FuncDeclAST.py')
-rw-r--r-- | src/mem/slicc/ast/FuncDeclAST.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/mem/slicc/ast/FuncDeclAST.py b/src/mem/slicc/ast/FuncDeclAST.py index 1d7e2c3ff..052d9f05e 100644 --- a/src/mem/slicc/ast/FuncDeclAST.py +++ b/src/mem/slicc/ast/FuncDeclAST.py @@ -57,9 +57,14 @@ class FuncDeclAST(DeclAST): # Generate function header for formal in self.formals: # Lookup parameter types - type, ident = formal.generate() - types.append(type) - params.append(ident) + try: + type, ident = formal.generate() + types.append(type) + params.append(ident) + + except AttributeError: + types.append(formal.type) + params.append(None) body = self.slicc.codeFormatter() if self.statements is None: |