-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Snippet Responsible
class Person { ... }
type NetID str
yale_database: map[NetID, Person] = map[NetID, Person] {
"mtr39": Person("Mateo Rodriguez", 18)
}
mateo: NetID = "mtr39"
print yale_database
(yale_database[mateo]).grow_up()
print yale_databaseStack Trace of Error
Using build from 10-08-2025 13:53:33
[ Trace ] INIT Virtual Stack at MODULE
[00:00:00] Parsing (hello.ms): !!! Error !!! --> hello.ms:29:23
|
29 | (yale_database[mateo]).grow_up()
| ^---
|
= expected EOI, +, -, *, /, %, binary_xor, binary_and, binary_or, bitwise_ls, bitwise_rs, +=, -=, *=, /=, %=, <, >, <=, >=, ==, !=, &&, ||, ^, unwrap, is, or declaration
Error: Did not compile successfully (1 Error)
Expected Behavior
MScript is supposed to call grow_up on the value returned from the map.
Any ideas where MScript breaks?
- Bytecode Interpreter
- AST Parser
- Compiler
- Optimizer
- Not Sure (It's okay!)
- Other: please explain
Brain Dump (Optional)
The parenthesis trick the AST parser into thinking the previous expression (yale_database) is callable. Fix: ensure that LHS for callable expressions are on the same line.
That way,
some_function
(1)
Should eval to:
function ptr filename.mmm#__fn0()
1
Instead of some_function(1)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working