/src/tools/syntax/tree/liberty_ast_terminal_node.e
Specman e | 59 lines | 37 code | 8 blank | 14 comment | 0 complexity | ff46ee3340bac83ffbcc21dbde97cfb1 MD5 | raw file
1-- This file is part of Liberty Eiffel. 2-- 3-- Liberty Eiffel is free software: you can redistribute it and/or modify 4-- it under the terms of the GNU General Public License as published by 5-- the Free Software Foundation, version 3 of the License. 6-- 7-- Liberty Eiffel is distributed in the hope that it will be useful, 8-- but WITHOUT ANY WARRANTY; without even the implied warranty of 9-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10-- GNU General Public License for more details. 11-- 12-- You should have received a copy of the GNU General Public License 13-- along with Liberty Eiffel. If not, see <http://www.gnu.org/licenses/>. 14-- 15deferred class LIBERTY_AST_TERMINAL_NODE 16 17inherit 18 EIFFEL_TERMINAL_NODE 19 20feature {ANY} 21 name: FIXED_STRING 22 23 image: EIFFEL_IMAGE 24 25 accept (v: VISITOR) is 26 do 27 check False end 28 end 29 30feature {EIFFEL_NODE_HANDLER} 31 display (output: OUTPUT_STREAM; indent: INTEGER; p: STRING) is 32 do 33 do_indent(output, indent, p) 34 output.put_character('"') 35 output.put_string(name) 36 output.put_string(once "%": ") 37 output.put_line(image.image) 38 end 39 40 generate (o: OUTPUT_STREAM) is 41 do 42 o.put_string(image.blanks) 43 o.put_string(image.image) 44 generate_forgotten(o) 45 end 46 47feature {} 48 make (a_name: ABSTRACT_STRING; a_image: like image) is 49 require 50 a_name.has_prefix(once "KW ") 51 do 52 name := a_name.intern 53 image := a_image 54 ensure 55 name = a_name 56 image = a_image 57 end 58 59end