demangle.go
func (st *state) templateArgs() []AST {
	if len(st.str) == 0 || (st.str[0] != 'I' && st.str[0] != 'J') {
		panic("internal error")
	}
	st.advance(1)

	var ret []AST
	for len(st.str) == 0 || st.str[0] != 'E' {
		arg := st.templateArg()
		ret = append(ret, arg)
	}
	st.advance(1)
	return ret
}
func (st *state) templateArgs() []AST {
	if len(st.str) == 0 || (st.str[0] != 'I' && st.str[0] != 'J') {
		panic("internal error")
	}
	st.advance(1)

	var ret []AST
	for len(st.str) == 0 || st.str[0] != 'E' {
		arg := st.templateArg()
		ret = append(ret, arg)
	}
	st.advance(1)
	return ret
}
func ( st * state ) templateArgs ( ) [ ] AST { if len ( st . str ) == 0 || ( st . str [ 0 ] != 'I' && st . str [ 0 ] != 'J' ) { panic ( " " ) } st . advance ( 1 ) var ret [ ] AST for len ( st . str ) == 0 || st . str [ 0 ] != 'E' { arg := st . templateArg ( ) ret = append ( ret , arg ) } st . advance ( 1 ) return ret }
// <template-args> ::= I <template-arg>+ E
<template - args > :: = I <template - arg > + E