File tree Expand file tree Collapse file tree 6 files changed +47
-4
lines changed
parser-itcl.r/simple-itcl.d
parser-tcloo.r/no-empty-line-between-classes.d Expand file tree Collapse file tree 6 files changed +47
-4
lines changed Original file line number Diff line number Diff line change @@ -30,3 +30,9 @@ commonProtected input.tcl /^ protected proc commonProtected "b"$/;" kind:proc
3030SmartToaster::commonProtected input.tcl /^ protected proc commonProtected "b"$/;" kind:procedure line:48 language:ITcl scope:class:SmartToaster access:protected roles:def extras:qualified,subparser end:48
3131commonPrivate input.tcl /^ private proc commonPrivate "c"$/;" kind:procedure line:49 language:ITcl scope:class:SmartToaster access:private roles:def extras:subparser end:49
3232SmartToaster::commonPrivate input.tcl /^ private proc commonPrivate "c"$/;" kind:procedure line:49 language:ITcl scope:class:SmartToaster access:private roles:def extras:qualified,subparser end:49
33+ X input.tcl /^itcl::class X {$/;" kind:class line:51 language:ITcl roles:def extras:subparser
34+ x input.tcl /^ variable x 0$/;" kind:variable line:52 language:ITcl scope:class:X roles:def extras:subparser end:52
35+ X::x input.tcl /^ variable x 0$/;" kind:variable line:52 language:ITcl scope:class:X roles:def extras:qualified,subparser end:52
36+ Y input.tcl /^itcl::class Y {$/;" kind:class line:54 language:ITcl roles:def extras:subparser
37+ y input.tcl /^ variable y 0$/;" kind:variable line:55 language:ITcl scope:class:Y roles:def extras:subparser end:55
38+ Y::y input.tcl /^ variable y 0$/;" kind:variable line:55 language:ITcl scope:class:Y roles:def extras:qualified,subparser end:55
Original file line number Diff line number Diff line change @@ -48,6 +48,12 @@ itcl::class SmartToaster {
4848 protected proc commonProtected " b"
4949 private proc commonPrivate " c"
5050}
51+ itcl::class X {
52+ variable x 0
53+ }
54+ itcl::class Y {
55+ variable y 0
56+ }
5157
5258set toaster [SmartToaster #auto]
5359$toaster toast 2
Original file line number Diff line number Diff line change 1+ --sort=no
2+ --fields=+li
Original file line number Diff line number Diff line change 1+ S input.tcl /^oo::class create S {$/;" c language:TclOO
2+ sx input.tcl /^ method sx {} {$/;" m language:TclOO class:S
3+ M input.tcl /^oo::class create M {$/;" c language:TclOO
4+ mx input.tcl /^ method mx {} {$/;" m language:TclOO class:M
5+ C input.tcl /^oo::class create C {$/;" c language:TclOO inherits:S
6+ cx input.tcl /^ method cx {} {$/;" m language:TclOO class:C
Original file line number Diff line number Diff line change 1+ oo::class create S {
2+ variable x
3+ method sx {} {
4+ set x 0
5+ }
6+ }
7+ oo::class create M {
8+ variable x
9+ method mx {} {
10+ incr x 3
11+ }
12+ }
13+ oo::class create C {
14+ superclass S
15+ mixin M
16+ variable x
17+ method cx {} {
18+ incr x 5
19+ }
20+ }
21+ # Taken from https://wiki.tcl-lang.org/page/Variables+in+TclOO
Original file line number Diff line number Diff line change @@ -632,8 +632,9 @@ static void parseNamespace (tokenInfo *const token,
632632 parseProc (token , index );
633633 else if (tokenIsType (token , TCL_IDENTIFIER ))
634634 {
635- notifyCommand (token , index );
636- skipToEndOfCmdline (token ); /* ??? */
635+ int r = notifyCommand (token , index );
636+ if (r == CORK_NIL )
637+ skipToEndOfCmdline (token );
637638 }
638639 else if (token -> type == '}' )
639640 {
@@ -682,8 +683,9 @@ static void findTclTags (void)
682683 parsePackage (token );
683684 else if (tokenIsType (token , TCL_IDENTIFIER ))
684685 {
685- notifyCommand (token , CORK_NIL );
686- skipToEndOfCmdline (token ); /* ??? */
686+ int r = notifyCommand (token , CORK_NIL );
687+ if (r == CORK_NIL )
688+ skipToEndOfCmdline (token );
687689 }
688690 else
689691 skipToEndOfCmdline (token );
You can’t perform that action at this time.
0 commit comments