mirror of
https://github.com/Open-Argon/argon-v2.git
synced 2026-10-28 09:44:03 +00:00
fix number addition bug
This commit is contained in:
1 parent
242b40f570
commit
97476abfed
3 files changed
+4
-15
No files matched your search
+1
-1
@@ -1 +1 @@
|
||||
const x = 10+18;
|
||||
184+103
|
||||
@@ -14,19 +14,7 @@ func init() {
|
||||
}
|
||||
|
||||
func run(lines []interface{}) {
|
||||
fmt.Println(runprocess(opperator{
|
||||
t: 11,
|
||||
x: opperator{
|
||||
t: 11, x: opperator{
|
||||
t: 11,
|
||||
x: 1e100,
|
||||
y: 5,
|
||||
}, y: " "},
|
||||
y: variable{
|
||||
variable: "HW",
|
||||
line: 10,
|
||||
},
|
||||
}))
|
||||
fmt.Println(runprocess(lines[0]))
|
||||
}
|
||||
|
||||
func runprocess(codeseg interface{}) interface{} {
|
||||
@@ -38,6 +26,7 @@ func runprocess(codeseg interface{}) interface{} {
|
||||
if myvar.EXISTS != nil {
|
||||
return myvar.VAL
|
||||
}
|
||||
log.Fatal("undecared variable on line " + fmt.Sprint(codeseg.(variable).line))
|
||||
}
|
||||
return codeseg
|
||||
}
|
||||
|
||||
+1
-1
@@ -178,7 +178,7 @@ var translateprocess = func(codeseg code) (interface{}, bool) {
|
||||
if !worked {
|
||||
continue
|
||||
}
|
||||
val2, worked := processfunc(code{code: split[0], line: codeseg.line})
|
||||
val2, worked := processfunc(code{code: split[1], line: codeseg.line})
|
||||
if !worked {
|
||||
continue
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user