code: public void addFunction(Define function) {
  		String fn = function.getFunctionName();
  		if (functionMap.containsKey(fn)) {
  			Define previous = functionMap.get(fn);
  			throw new ParseException(
  				"Template function \"" + fn + "\" already defined in " + 
  				getAlreadyDefinedLocation(previous.getLocation()),
  				function.getLocation()
  			);
  		}
  		functionMap.put(fn, function);
  	}
docs: Add template function