bh_arr(AstTyped *) stored_tags;
+ // Used to set default precedence of #overload options.
+ // This way, the precedence order of multiple #overload
+ // options in the same file is given to be the lexical
+ // order. This does not make any guarentees about #overloads
+ // in other files.
+ u32 overload_count;
+
u16 tag_depth : 16;
b32 hit_unexpected_token : 1;
add_overload->precedence = bh_max(pre->value.l, 0);
} else {
- add_overload->precedence = 0;
+ add_overload->precedence = parser->overload_count++;
}
parser->parse_calls = 0;
parser.stored_tags = NULL;
parser.parse_calls = 1;
parser.tag_depth = 0;
+ parser.overload_count = 0;
parser.polymorph_context = (PolymorphicContext) {
.root_node = NULL,
// These need to have aliases because some of them like
// 'delete', collide with the global 'delete', which
// causes it to map to the wrong function.
- init :: (package core.map).init
- has :: (package core.map).has
- get :: (package core.map).get
- get_ptr :: (package core.map).get_ptr
- put :: (package core.map).put
- delete :: (package core.map).delete
- update :: (package core.map).update
- clear :: (package core.map).clear
- empty :: (package core.map).empty
+ init :: init
+ has :: has
+ get :: get
+ get_ptr :: get_ptr
+ put :: put
+ delete :: delete
+ update :: update
+ clear :: clear
+ empty :: empty
}
make :: ($Key: type_expr, $Value: type_expr, default := Value.{}) -> Map(Key, Value) {
//
// - You can pass an existing slice. The behavior of this
// buffer depend on the other arguments. If you set
-// write_enabled to false, then writing will be allowed
+// write_enabled to false, then writing will not be allowed
// into this buffer. This is good practice if you only
// plan on using the stream as a read-only output for
// io.Reader. If you enable writing, then you can