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

Contents of /vendor/gobosoft.com/gobo/4.0d/library/tools/src/eiffel/ast/type/et_bit_feature.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: 2450 byte(s)
Updated to new version of Gobo with new layout on 2016/05/06
1 note
2
3 description:
4
5 "Eiffel 'BIT feature' types"
6
7 library: "Gobo Eiffel Tools Library"
8 copyright: "Copyright (c) 2001-2014, Eric Bezault and others"
9 license: "MIT License"
10 date: "$Date$"
11 revision: "$Revision$"
12
13 class ET_BIT_FEATURE
14
15 inherit
16
17 ET_BIT_TYPE
18 redefine
19 reset
20 end
21
22 create
23
24 make
25
26 feature {NONE} -- Initialization
27
28 make (a_name: like name; a_named_base_class: like named_base_class)
29 -- Create a new 'BIT feature' type.
30 require
31 a_name_not_void: a_name /= Void
32 a_named_base_class_not_void: a_named_base_class /= Void
33 do
34 bit_keyword := tokens.bit_keyword
35 name := a_name
36 size := No_size
37 named_base_class := a_named_base_class
38 ensure
39 name_set: name = a_name
40 named_base_class_set: named_base_class = a_named_base_class
41 end
42
43 feature -- Initialization
44
45 reset
46 -- Reset type as it was just after it was last parsed.
47 do
48 name.reset
49 end
50
51 feature -- Access
52
53 name: ET_IDENTIFIER
54 -- Name of the feature associated with
55 -- current type and which is supposed
56 -- to be an integer constant attribute
57
58 seed: INTEGER
59 -- Feature ID of one of the seeds of the
60 -- feature associated with current type;
61 -- 0 if not resolved yet
62 do
63 Result := name.seed
64 ensure
65 seed_positive: Result >= 0
66 end
67
68 position: ET_POSITION
69 -- Position of first character of
70 -- current node in source code
71 do
72 Result := bit_keyword.position
73 if Result.is_null then
74 Result := name.position
75 end
76 end
77
78 first_leaf: ET_AST_LEAF
79 -- First leaf node in current node
80 do
81 Result := bit_keyword
82 end
83
84 last_leaf: ET_AST_LEAF
85 -- Last leaf node in current node
86 do
87 Result := name
88 end
89
90 feature -- Resolving
91
92 resolve_identifier_type (a_seed: INTEGER; a_constant: like constant)
93 -- Resolve current type with `a_seed' and `a_constant'.
94 require
95 a_seed_positive: a_seed > 0
96 a_constant_not_void: a_constant /= Void
97 do
98 name.set_seed (a_seed)
99 constant := a_constant
100 ensure
101 seed_set: seed = a_seed
102 constant_set: constant = a_constant
103 end
104
105 feature -- Output
106
107 append_to_string (a_string: STRING)
108 -- Append textual representation of
109 -- current type to `a_string'.
110 do
111 a_string.append_string (bit_space)
112 a_string.append_string (name.lower_name)
113 end
114
115 feature -- Processing
116
117 process (a_processor: ET_AST_PROCESSOR)
118 -- Process current node.
119 do
120 a_processor.process_bit_feature (Current)
121 end
122
123 invariant
124
125 name_not_void: name /= Void
126
127 end

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.23