/[eiffelstudio]/vendor/gobosoft.com/gobo/4.0d/library/tools/src/eiffel/ast/type/et_bit_n.e
ViewVC logotype

Contents of /vendor/gobosoft.com/gobo/4.0d/library/tools/src/eiffel/ast/type/et_bit_n.e

Parent Directory Parent Directory | Revision Log Revision Log


Revision 98686 - (show annotations)
Sat May 7 16:18:26 2016 UTC (3 years, 5 months ago) by manus
File size: 1768 byte(s)
Updated to new version of Gobo with new layout on 2016/05/06
1 note
2
3 description:
4
5 "Eiffel 'BIT N' types"
6
7 library: "Gobo Eiffel Tools Library"
8 copyright: "Copyright (c) 2003-2014, Eric Bezault and others"
9 license: "MIT License"
10 date: "$Date$"
11 revision: "$Revision$"
12
13 class ET_BIT_N
14
15 inherit
16
17 ET_BIT_TYPE
18 redefine
19 constant
20 end
21
22 create
23
24 make
25
26 feature {NONE} -- Initialization
27
28 make (a_constant: like constant; a_named_base_class: like named_base_class)
29 -- Create a new 'BIT N' type.
30 require
31 a_constant_not_void: a_constant /= Void
32 a_named_base_class_not_void: a_named_base_class /= Void
33 do
34 bit_keyword := tokens.bit_keyword
35 constant := a_constant
36 size := No_size
37 named_base_class := a_named_base_class
38 ensure
39 constant_set: constant = a_constant
40 named_base_class_set: named_base_class = a_named_base_class
41 end
42
43 feature -- Access
44
45 constant: ET_INTEGER_CONSTANT
46 -- Integer constant
47
48 position: ET_POSITION
49 -- Position of first character of
50 -- current node in source code
51 do
52 Result := bit_keyword.position
53 if Result.is_null then
54 Result := constant.position
55 end
56 end
57
58 first_leaf: ET_AST_LEAF
59 -- First leaf node in current node
60 do
61 Result := bit_keyword
62 end
63
64 last_leaf: ET_AST_LEAF
65 -- Last leaf node in current node
66 do
67 Result := constant
68 end
69
70 feature -- Output
71
72 append_to_string (a_string: STRING)
73 -- Append textual representation of
74 -- current type to `a_string'.
75 do
76 a_string.append_string (bit_space)
77 if constant.is_negative then
78 a_string.append_character ('-')
79 end
80 a_string.append_string (constant.literal)
81 end
82
83 feature -- Processing
84
85 process (a_processor: ET_AST_PROCESSOR)
86 -- Process current node.
87 do
88 a_processor.process_bit_n (Current)
89 end
90
91 invariant
92
93 constant_not_void: constant /= Void
94
95 end

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.23