You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
94 lines
3.2 KiB
Plaintext
94 lines
3.2 KiB
Plaintext
(*script.Program)({
|
|
Statements: ([]script.Expression) (len=1) {
|
|
(*script.FunctionCall)({
|
|
Receiver: (*script.Identifier)({
|
|
Value: (string) (len=3) "for"
|
|
}),
|
|
Arguments: ([]script.ArgumentExpression) (len=3) {
|
|
(*script.BinaryOperation)({
|
|
Lhs: (*script.Identifier)({
|
|
Value: (string) (len=1) "n"
|
|
}),
|
|
Operator: (string) "",
|
|
Rhs: (script.Expression) <nil>
|
|
}),
|
|
(*script.BinaryOperation)({
|
|
Lhs: (*script.ParenthesizedExpression)({
|
|
Inner: (*script.FunctionCall)({
|
|
Receiver: (*script.Identifier)({
|
|
Value: (string) (len=5) "range"
|
|
}),
|
|
Arguments: ([]script.ArgumentExpression) (len=2) {
|
|
(*script.BinaryOperation)({
|
|
Lhs: (*script.LiteralNumber)({
|
|
Value: (float64) 1
|
|
}),
|
|
Operator: (string) "",
|
|
Rhs: (script.Expression) <nil>
|
|
}),
|
|
(*script.BinaryOperation)({
|
|
Lhs: (*script.LiteralNumber)({
|
|
Value: (float64) 10
|
|
}),
|
|
Operator: (string) "",
|
|
Rhs: (script.Expression) <nil>
|
|
})
|
|
}
|
|
})
|
|
}),
|
|
Operator: (string) "",
|
|
Rhs: (script.Expression) <nil>
|
|
}),
|
|
(*script.BinaryOperation)({
|
|
Lhs: (*script.ListExpression)({
|
|
Values: ([]script.Expression) (len=2) {
|
|
(*script.BinaryOperation)({
|
|
Lhs: (*script.Identifier)({
|
|
Value: (string) (len=1) "m"
|
|
}),
|
|
Operator: (string) (len=2) ":=",
|
|
Rhs: (*script.BinaryOperation)({
|
|
Lhs: (*script.Identifier)({
|
|
Value: (string) (len=1) "n"
|
|
}),
|
|
Operator: (string) (len=1) "*",
|
|
Rhs: (*script.BinaryOperation)({
|
|
Lhs: (*script.Identifier)({
|
|
Value: (string) (len=1) "n"
|
|
}),
|
|
Operator: (string) "",
|
|
Rhs: (script.Expression) <nil>
|
|
})
|
|
})
|
|
}),
|
|
(*script.FunctionCall)({
|
|
Receiver: (*script.Identifier)({
|
|
Value: (string) (len=8) "printfln"
|
|
}),
|
|
Arguments: ([]script.ArgumentExpression) (len=2) {
|
|
(*script.BinaryOperation)({
|
|
Lhs: (*script.LiteralString)({
|
|
Value: (string) (len=8) "n^2 = %v"
|
|
}),
|
|
Operator: (string) "",
|
|
Rhs: (script.Expression) <nil>
|
|
}),
|
|
(*script.BinaryOperation)({
|
|
Lhs: (*script.Identifier)({
|
|
Value: (string) (len=1) "m"
|
|
}),
|
|
Operator: (string) "",
|
|
Rhs: (script.Expression) <nil>
|
|
})
|
|
}
|
|
})
|
|
}
|
|
}),
|
|
Operator: (string) "",
|
|
Rhs: (script.Expression) <nil>
|
|
})
|
|
}
|
|
})
|
|
}
|
|
})
|