tokensToFunction function

PathFunction tokensToFunction(
  1. List<Token> tokens
)

Creates a PathFunction from tokens.

Implementation

PathFunction tokensToFunction(List<Token> tokens) {
  return (args) {
    final buffer = StringBuffer();
    for (final token in tokens) {
      buffer.write(token.toPath(args));
    }
    return buffer.toString();
  };
}