Changeset 530
- Timestamp:
- 02/04/09 22:49:43 (3 years ago)
- Location:
- interpreter/trunk
- Files:
-
- 5 added
- 7 edited
-
ChangeLog (modified) (1 diff)
-
modules/Makefile.am (modified) (1 diff)
-
modules/System/collections (added)
-
modules/System/collections/array.c (added)
-
modules/System/list.c (modified) (2 diffs)
-
modules/System/regex.kt (modified) (4 diffs)
-
tests/Makefile.am (modified) (1 diff)
-
tests/objs/array (added)
-
tests/objs/array/test_array.kt (added)
-
tests/objs/array/test_array.kt.out (added)
-
tests/objs/list/append.kt.out (modified) (1 diff)
-
tests/objs/list/prepend2.kt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
interpreter/trunk/ChangeLog
r523 r530 1 2/4/2009: 2 * list|append and operator+ now create new lists instead of modifying the existing list. 3 The << operator modifies the list on the left hand side. (credit: Michael J. Edgar) 4 * Integrate array class as System.collections.array. (credit: Michael J. Edgar) 5 1 6 1/31/2009: 2 7 * Regular expressions can be specified with "r/.../[i]" syntax (ticket #79) -
interpreter/trunk/modules/Makefile.am
r528 r530 13 13 __internal/_cinvoke_function.c __internal/_cinvoke_structure.c \ 14 14 __internal/_cinvoke_callback.c System/digest.c System/digest/md5.c \ 15 System/digest/md5.h System/date/hires.c 15 System/digest/md5.h System/date/hires.c System/collections/array.c 16 16 17 17 nobase_dist_pkglib_SCRIPTS = System.kt System/network/wrapper.kt \ -
interpreter/trunk/modules/System/list.c
r529 r530 619 619 kite_add_operator(thread, newclass, OP_ADD, 620 620 kite_new_method_compiled_with_docs(thread, List_add, 621 "Creates a new list that is the combination of the two operands.", 1, 622 "item", "Item to add.")); 623 621 624 kite_add_operator(thread, newclass, OP_LEFT_SHIFT, 622 625 kite_new_method_compiled_with_docs(thread, List_lshift, … … 624 627 "item", "Item to add.")); 625 628 626 "Creates a new list that is the combination of the two operands.", 1,627 "item", "Item to add."));628 629 kite_add_operator(thread, newclass, OP_LESS_THAN, 629 630 kite_new_method_compiled_with_docs(thread, List_lessthan, -
interpreter/trunk/modules/System/regex.kt
r520 r530 173 173 while(not (thematch is System.null) and j < max) 174 174 [ 175 ret |append(str|substring(start, thematch.match_begin - start));175 ret << str|substring(start, thematch.match_begin - start); 176 176 decide 177 177 [ … … 180 180 while(i < thematch.captures|count) 181 181 [ 182 ret |append(thematch.captures[i]);182 ret << thematch.captures[i]; 183 183 i = i + 1; 184 184 ]; … … 191 191 ]; 192 192 193 ret |append(str|substring(start));193 ret << str|substring(start); 194 194 ret; 195 195 ]; … … 214 214 while (i < arg|get_num_groups) 215 215 [ 216 this.captures |append(arg|get_group(i));216 this.captures << arg|get_group(i); 217 217 i = i + 1; 218 218 ]; -
interpreter/trunk/tests/Makefile.am
r523 r530 248 248 ./objs/os/args.kt.out \ 249 249 ./objs/os/args.kt \ 250 ./objs/array/test_array.kt \ 251 ./objs/array/test_array.kt.out \ 250 252 ./objs/regex/basic_regex.kt \ 251 253 ./objs/regex/basic_regex.kt.out \ -
interpreter/trunk/tests/objs/list/append.kt.out
r199 r530 1 1 [2] 2 [ [1, 2, 3]]2 [1, 2, 3] 3 3 [1, 2, 3] 4 4 [1, 2, 3, 4] -
interpreter/trunk/tests/objs/list/prepend2.kt
r247 r530 1 1 stack = []; 2 stack |append("is a");3 stack |prepend("This ");4 stack |append(" test!");2 stack = stack|append("is a"); 3 stack = stack|prepend("This "); 4 stack = stack|append(" test!"); 5 5 stack|print;
Note: See TracChangeset
for help on using the changeset viewer.
