Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  [The "BSD licence"]
  Copyright (c) 2003-2005 Terence Parr
  All rights reserved.
  Redistribution and use in source and binary forms, with or without
  modification, are permitted provided that the following conditions
  are met:
  1. Redistributions of source code must retain the above copyright
    notice, this list of conditions and the following disclaimer.
 2. Redistributions in binary form must reproduce the above copyright
    notice, this list of conditions and the following disclaimer in the
    documentation and/or other materials provided with the distribution.
 3. The name of the author may not be used to endorse or promote products
    derived from this software without specific prior written permission.
package org.antlr.stringtemplate.language;
A string template expression embedded within the template. A template is parsed into a tokenized vector of Expr objects and then executed after the user sticks in attribute values. This list of Expr objects represents a "program" for the StringTemplate evaluator.
abstract public class Expr {
The StringTemplate object surrounding this expr
	protected StringTemplate enclosingTemplate;

Any thing spit out as a chunk (even plain text) must be indented according to whitespace before the action that generated it. So, plain text in the outermost template is never indented, but the text and attribute references in a nested template will all be indented by the amount seen directly in front of the attribute reference that initiates construction of the nested template.
    protected String indentation = null;
	public Expr(StringTemplate enclosingTemplate) {
		this. = enclosingTemplate;

How to write this node to output; return how many char written
    abstract public int write(StringTemplate selfStringTemplateWriter out)
        throws IOException;
    public String getIndentation() {
        return ;
    public void setIndentation(String indentation) {
        this. = indentation;
New to GrepCode? Check out our FAQ X