01: /*
02: * $Id: CharacterDataStatement.java,v 1.13 2002/09/16 08:05:06 jkl Exp $
03: *
04: * Copyright (c) 2002 Njet Communications Ltd. All Rights Reserved.
05: *
06: * Use is subject to license terms, as defined in
07: * Anvil Sofware License, Version 1.1. See LICENSE
08: * file, or http://njet.org/license-1.1.txt
09: */
10: package anvil.script.statements;
11:
12: import java.io.IOException;
13: import java.util.ArrayList;
14:
15: import anvil.core.Any;
16: import anvil.Location;
17: import anvil.codec.Code;
18: import anvil.parser.Tag;
19: import anvil.script.Context;
20: import anvil.ErrorListener;
21: import anvil.script.Context;
22: import anvil.script.compiler.ByteCompiler;
23: import anvil.script.expression.Expression;
24: import anvil.script.parser.TemplateParser;
25: import anvil.script.Grammar;
26:
27: /**
28: * class CharacterDataStatement
29: *
30: * @author: Jani Lehtimäki
31: */
32: public class CharacterDataStatement extends Statement {
33:
34: protected String _image = null;
35:
36: public CharacterDataStatement(Statement parent, Location location) {
37: super (parent, location);
38: }
39:
40: public CharacterDataStatement(Statement parent, Location location,
41: String cdata) {
42: super (parent, location);
43: _image = cdata;
44: }
45:
46: public int typeOf() {
47: return Statement.ST_CDATA;
48: }
49:
50: public String name() {
51: return "cdata";
52: }
53:
54: public boolean hasStaticContent() {
55: return true;
56: }
57:
58: public String getStaticContent() {
59: return _image;
60: }
61:
62: public void check(ErrorListener context) {
63: }
64:
65: public void compile(ByteCompiler context) {
66: context.text(context.getCode(), _image, false);
67: }
68:
69: }
|