File tree Expand file tree Collapse file tree 1 file changed +23
-23
lines changed
Expand file tree Collapse file tree 1 file changed +23
-23
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,29 @@ csQuery.SELECTOR <- {
1111 ALL_OR_FIRST = 42 // *
1212}
1313
14- function csQuery ::Find (query) {
14+ local findBy = function (findFunction, arg) {
15+ local ents = [];
16+ for (local ent; ent = findFunction. call (Entities, ent, arg); )
17+ {
18+ ents. push (ent);
19+ }
20+ return ents;
21+ }
22+
23+ local next = function () {
24+ local ents = [];
25+ for (local ent; ent = Entities. Next (ent); )
26+ {
27+ ents. push (ent);
28+ }
29+ return ents;
30+ }
31+
32+ local first = function () {
33+ return [ Entities. Next (null ) ];
34+ }
35+
36+ function csQuery ::Find (query) : (findBy, next, first) {
1537 if (typeof query == " instance" )
1638 return QueryArray ([query]);
1739
@@ -41,26 +63,4 @@ function csQuery::Find(query) {
4163 }
4264
4365 return QueryArray (output);
44- }
45-
46- local findBy = function (findFunction, arg) {
47- local ents = [];
48- for (local ent; ent = findFunction. call (Entities, ent, arg); )
49- {
50- ents. push (ent);
51- }
52- return ents;
53- }
54-
55- local next = function () {
56- local ents = [];
57- for (local ent; ent = Entities. Next (ent); )
58- {
59- ents. push (ent);
60- }
61- return ents;
62- }
63-
64- local first = function () {
65- return [ Entities. Next (null ) ];
6666}
You can’t perform that action at this time.
0 commit comments