slicc: fix missing inline function in LocalVariableAST
This commit is contained in:
parent
93fff6f636
commit
3d8c8a85fa
1 changed files with 9 additions and 0 deletions
|
@ -1,4 +1,5 @@
|
|||
#
|
||||
# Copyright (c) 2013 Advanced Micro Devices, Inc.
|
||||
# Copyright (c) 2011 Mark D. Hill and David A. Wood
|
||||
# All rights reserved.
|
||||
#
|
||||
|
@ -43,6 +44,14 @@ class LocalVariableAST(StatementAST):
|
|||
def name(self):
|
||||
return self.var_name
|
||||
|
||||
def inline(self, get_type=False):
|
||||
code = self.slicc.codeFormatter(fix_newlines=False)
|
||||
return_type = self.generate(code)
|
||||
if get_type:
|
||||
return return_type, code
|
||||
else:
|
||||
return code
|
||||
|
||||
def generate(self, code):
|
||||
type = self.type_ast.type;
|
||||
ident = "%s" % self.ident;
|
||||
|
|
Loading…
Reference in a new issue