author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Tue, 24 Sep 2013 23:18:24 +0200 | |
branch | initialV |
changeset 1180 | 01c6be61f29c |
parent 708 | e579a063d162 |
child 725 | 1654323dc2fd |
permissions | -rw-r--r-- |
692 | 1 |
"{ Package: 'stx:libjavascript' }" |
2 |
||
3 |
JavaScriptParser subclass:#JavaScriptCompletionParser |
|
4 |
instanceVariableNames:'nodeRewriteHook' |
|
5 |
classVariableNames:'' |
|
6 |
poolDictionaries:'' |
|
7 |
category:'Languages-JavaScript-Compiling & Parsing' |
|
8 |
! |
|
9 |
||
10 |
||
11 |
!JavaScriptCompletionParser methodsFor:'accessing'! |
|
12 |
||
13 |
nodeRewriteHook |
|
14 |
^ nodeRewriteHook |
|
15 |
! |
|
16 |
||
17 |
nodeRewriteHook:oneArgBlock |
|
18 |
nodeRewriteHook := oneArgBlock. |
|
19 |
! ! |
|
20 |
||
701
740af7ecc058
Support for completing variables.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
692
diff
changeset
|
21 |
!JavaScriptCompletionParser methodsFor:'error handling'! |
740af7ecc058
Support for completing variables.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
692
diff
changeset
|
22 |
|
740af7ecc058
Support for completing variables.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
692
diff
changeset
|
23 |
parseError:aMessage position:position to:endPos |
740af7ecc058
Support for completing variables.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
692
diff
changeset
|
24 |
|
740af7ecc058
Support for completing variables.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
692
diff
changeset
|
25 |
"Created: / 23-09-2013 / 21:10:42 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
740af7ecc058
Support for completing variables.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
692
diff
changeset
|
26 |
! ! |
740af7ecc058
Support for completing variables.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
692
diff
changeset
|
27 |
|
692 | 28 |
!JavaScriptCompletionParser methodsFor:'initialization'! |
29 |
||
30 |
initialize |
|
31 |
"Invoked when a new instance is created." |
|
32 |
||
33 |
"/ please change as required (and remove this comment) |
|
34 |
||
35 |
super initialize. |
|
36 |
nodeRewriteHook := [:node | node ]. |
|
37 |
||
38 |
"Modified: / 23-09-2013 / 13:33:45 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
39 |
! ! |
|
40 |
||
41 |
!JavaScriptCompletionParser methodsFor:'parsing-expressions'! |
|
42 |
||
43 |
expression |
|
44 |
^ nodeRewriteHook value: super expression. |
|
45 |
||
46 |
"Created: / 16-06-2011 / 14:58:11 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
47 |
"Modified: / 05-07-2011 / 21:11:38 / cg" |
|
48 |
"Modified: / 23-09-2013 / 13:32:36 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
49 |
! |
|
50 |
||
708
e579a063d162
Minor fixes, making StatementBlockNode obsolete.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
701
diff
changeset
|
51 |
newExpression |
e579a063d162
Minor fixes, making StatementBlockNode obsolete.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
701
diff
changeset
|
52 |
| node | |
e579a063d162
Minor fixes, making StatementBlockNode obsolete.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
701
diff
changeset
|
53 |
|
e579a063d162
Minor fixes, making StatementBlockNode obsolete.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
701
diff
changeset
|
54 |
node := super newExpression. |
e579a063d162
Minor fixes, making StatementBlockNode obsolete.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
701
diff
changeset
|
55 |
node classOrFunc: (nodeRewriteHook value: node classOrFunc). |
e579a063d162
Minor fixes, making StatementBlockNode obsolete.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
701
diff
changeset
|
56 |
^ node |
e579a063d162
Minor fixes, making StatementBlockNode obsolete.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
701
diff
changeset
|
57 |
|
e579a063d162
Minor fixes, making StatementBlockNode obsolete.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
701
diff
changeset
|
58 |
"Created: / 24-09-2013 / 17:58:58 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
e579a063d162
Minor fixes, making StatementBlockNode obsolete.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
701
diff
changeset
|
59 |
! |
e579a063d162
Minor fixes, making StatementBlockNode obsolete.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
701
diff
changeset
|
60 |
|
692 | 61 |
primaryExpression |
62 |
^ nodeRewriteHook value: super primaryExpression. |
|
63 |
||
64 |
"Created: / 22-07-2013 / 15:37:04 / cg" |
|
65 |
"Modified: / 23-09-2013 / 13:34:19 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
66 |
! |
|
67 |
||
68 |
unaryExpression |
|
69 |
^ nodeRewriteHook value: super unaryExpression. |
|
70 |
||
71 |
"Created: / 05-07-2011 / 23:08:54 / cg" |
|
72 |
"Modified: / 23-09-2013 / 13:34:31 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
73 |
! ! |
|
74 |
||
75 |
!JavaScriptCompletionParser class methodsFor:'documentation'! |
|
76 |
||
77 |
version |
|
78 |
^ '$Header$' |
|
79 |
! |
|
80 |
||
81 |
version_CVS |
|
82 |
^ '$Header$' |
|
83 |
! ! |
|
84 |