author | Patrik Svestka <patrik.svestka@gmail.com> |
Wed, 14 Nov 2018 13:01:14 +0100 | |
changeset 642 | 77d5fddb6462 |
parent 435 | 3bc08fb90133 |
permissions | -rw-r--r-- |
435 | 1 |
"{ Package: 'stx:goodies/petitparser/parsers/java' }" |
2 |
||
3 |
"{ NameSpace: Smalltalk }" |
|
4 |
||
5 |
PJASTNode subclass:#PJVariableDeclaratorNode |
|
6 |
instanceVariableNames:'variable arrayLevel initializer' |
|
7 |
classVariableNames:'' |
|
8 |
poolDictionaries:'' |
|
9 |
category:'PetitJava-AST' |
|
10 |
! |
|
11 |
||
642
77d5fddb6462
Issue #239: Fix all Smalltak/X source files to be in unicode (UTF8 without BOM) and prefixed by "{ Encoding: utf8 }" when any unicode character is present
Patrik Svestka <patrik.svestka@gmail.com>
parents:
435
diff
changeset
|
12 |
PJVariableDeclaratorNode comment:'A part of local variable declaration statement. |
77d5fddb6462
Issue #239: Fix all Smalltak/X source files to be in unicode (UTF8 without BOM) and prefixed by "{ Encoding: utf8 }" when any unicode character is present
Patrik Svestka <patrik.svestka@gmail.com>
parents:
435
diff
changeset
|
13 |
|
77d5fddb6462
Issue #239: Fix all Smalltak/X source files to be in unicode (UTF8 without BOM) and prefixed by "{ Encoding: utf8 }" when any unicode character is present
Patrik Svestka <patrik.svestka@gmail.com>
parents:
435
diff
changeset
|
14 |
Example. |
77d5fddb6462
Issue #239: Fix all Smalltak/X source files to be in unicode (UTF8 without BOM) and prefixed by "{ Encoding: utf8 }" when any unicode character is present
Patrik Svestka <patrik.svestka@gmail.com>
parents:
435
diff
changeset
|
15 |
statement: int a; |
77d5fddb6462
Issue #239: Fix all Smalltak/X source files to be in unicode (UTF8 without BOM) and prefixed by "{ Encoding: utf8 }" when any unicode character is present
Patrik Svestka <patrik.svestka@gmail.com>
parents:
435
diff
changeset
|
16 |
declarator: a |
77d5fddb6462
Issue #239: Fix all Smalltak/X source files to be in unicode (UTF8 without BOM) and prefixed by "{ Encoding: utf8 }" when any unicode character is present
Patrik Svestka <patrik.svestka@gmail.com>
parents:
435
diff
changeset
|
17 |
|
77d5fddb6462
Issue #239: Fix all Smalltak/X source files to be in unicode (UTF8 without BOM) and prefixed by "{ Encoding: utf8 }" when any unicode character is present
Patrik Svestka <patrik.svestka@gmail.com>
parents:
435
diff
changeset
|
18 |
statement: float a, b = 4; |
77d5fddb6462
Issue #239: Fix all Smalltak/X source files to be in unicode (UTF8 without BOM) and prefixed by "{ Encoding: utf8 }" when any unicode character is present
Patrik Svestka <patrik.svestka@gmail.com>
parents:
435
diff
changeset
|
19 |
declarator1: a |
77d5fddb6462
Issue #239: Fix all Smalltak/X source files to be in unicode (UTF8 without BOM) and prefixed by "{ Encoding: utf8 }" when any unicode character is present
Patrik Svestka <patrik.svestka@gmail.com>
parents:
435
diff
changeset
|
20 |
declarator2: b = 4' |
435 | 21 |
! |
22 |
||
23 |
!PJVariableDeclaratorNode methodsFor:'accessing'! |
|
24 |
||
25 |
acceptVisitor: aVisitor |
|
26 |
||
27 |
^ aVisitor visitVariableDeclaratorNode: self |
|
28 |
! |
|
29 |
||
30 |
arrayLevel |
|
31 |
^ arrayLevel |
|
32 |
! |
|
33 |
||
34 |
arrayLevel: anObject |
|
35 |
arrayLevel := anObject |
|
36 |
! |
|
37 |
||
38 |
initializer |
|
39 |
^ initializer |
|
40 |
! |
|
41 |
||
42 |
initializer: anObject |
|
43 |
initializer := anObject |
|
44 |
! |
|
45 |
||
46 |
variable |
|
47 |
^ variable |
|
48 |
! |
|
49 |
||
50 |
variable: anObject |
|
51 |
variable := anObject |
|
52 |
! ! |
|
53 |