···11+proc main!() {
22+ let first = match [1, 2, 3]
33+ case typeof 'string then 1
44+ case typeof 'tuple then 2
55+ case typeof 'struct then 3
66+ case typeof 'array then 4
77+ else { assert false }
88+ let second = match 'hello('world)
99+ case typeof 'string then 1
1010+ case typeof 'tuple then 2
1111+ case typeof 'struct then 3
1212+ case typeof 'array then 4
1313+ else { assert false }
1414+ assert first + second == 7
1515+}
···5050 segments.push(TemplateSegment { interpolation, end });
5151 break;
5252 }
5353- let tag = parser
5454- .check(TokenType::Identifier)
5555- .ok()
5656- .map(|_| ())
5757- .map(|_| Identifier::parse(parser))
5858- .transpose()?;
5353+ parser.chomp();
5454+ let tag = if !parser.is_line_start {
5555+ parser
5656+ .check(TokenType::Identifier)
5757+ .ok()
5858+ .map(|_| ())
5959+ .map(|_| Identifier::parse(parser))
6060+ .transpose()?
6161+ } else {
6262+ None
6363+ };
59646065 let mut span = template_start.span;
6166 if !segments.is_empty() {
+14
trilogy/src/stdlib/core.tri
···101101 let lhs:rhs = destruct!(val)
102102 $"${lhs}(${rhs})"
103103 }
104104+ # TODO: This is not working well, even just to have this case in place
105105+ # case typeof 'array {
106106+ # let mut str = $"["
107107+ # let mut i = 0
108108+ # while i < length!(val) {
109109+ # str <>= $"${val.i}"
110110+ # i += 1
111111+ # if i != length!(val) {
112112+ # str <>= ", "
113113+ # }
114114+ # }
115115+ # str <>= "]"
116116+ # str
117117+ # }
104118 else then primitive_to_string!(val)
105119}