浏览代码

Merge pull request #185 from GWRon/fix_noLocalArgs

Fix: TArgDecl does not need "Local "-prefix in ToString().
Brucey 9 年之前
父节点
当前提交
a6442a5a0e
共有 1 个文件被更改,包括 9 次插入1 次删除
  1. 9 1
      decl.bmx

+ 9 - 1
decl.bmx

@@ -491,9 +491,13 @@ Type TLocalDecl Extends TVarDecl
 	Method OnCopy:TDecl(deep:Int = True)
 		Return New TLocalDecl.Create( ident,ty,CopyInit(),attrs, generated )
 	End Method
+
+	Method GetDeclPrefix:string()
+		return "Local "
+	End Method
 	
 	Method ToString$()
-		Return "Local "+Super.ToString()
+		Return GetDeclPrefix() + Super.ToString()
 	End Method
 
 End Type
@@ -525,6 +529,10 @@ Type TArgDecl Extends TLocalDecl
 		d.init = d.declInit
 		Return d
 	End Method
+
+	Method GetDeclPrefix:string()
+		return ""
+	End Method
 	
 	Method ToString$()
 		Return Super.ToString()