Make --parse-only not highlight and redo format of parse errors so that kraken.vim syntax checking works, fix naming to allow multiple instantiations of object templates, fix so that template type replacements go through to bodies of methods of object templates in the fourth_pass

This commit is contained in:
Nathan Braswell
2016-02-15 16:31:01 -05:00
parent 3da140cc5e
commit 815c213270
11 changed files with 115 additions and 31 deletions

View File

@@ -56,11 +56,21 @@ fun some_other_function(in: bool): float {
*/
obj SimpleContainer<T> {
var data: T
fun print_data() {
var indirection: T
indirection = data
println(indirection)
}
fun construct(dataIn: T) data = dataIn
}
fun main(): int {
var it: SimpleContainer<*char>
it.data = "Wooo object template"
println(it.data)
it.data = "Wooo object template methods"
it.print_data()
var it2.construct(3): SimpleContainer<int>
it2.print_data()
/*println(other_id("Wooo function template inference"))*/
/*var a = id<int>(7)*/
/*println(a)*/