Rename methods named 'with'.
authorJean Privat <jean@pryen.org>
Sun, 28 Dec 2008 16:28:43 +0000 (11:28 -0500)
committerJean Privat <jean@pryen.org>
Sun, 28 Dec 2008 16:28:43 +0000 (11:28 -0500)
Blocs will use the reserved 'with' keyword.

lib/standard/array.nit
src/parser/parser.nit
src/parser/xss/parser.xss
src/syntax/control_flow.nit
src/syntax/mmbuilder.nit
src/syntax/typing.nit

index 47933dc..4e5c678 100644 (file)
@@ -261,7 +261,7 @@ special ArrayCapable[E]
        end
 
        # Create an array with some `items'.
-       init with(objects: E...)
+       init with_items(objects: E...)
        do
                _items = objects._items
                _capacity = objects._capacity
index 701ba35..e54031c 100644 (file)
@@ -158,7 +158,7 @@ special ParserTable
        attr _reduce_table: Array[ReduceAction]
        private meth build_reduce_table
        do
-               _reduce_table = new Array[ReduceAction].with(
+               _reduce_table = new Array[ReduceAction].with_items(
                        new ReduceAction0,
                        new ReduceAction1,
                        new ReduceAction2,
index 6fc5fa2..c4df56c 100644 (file)
@@ -171,7 +171,7 @@ special ParserTable
        attr _reduce_table: Array[ReduceAction]
        private meth build_reduce_table
        do
-               _reduce_table = new Array[ReduceAction].with(
+               _reduce_table = new Array[ReduceAction].with_items(
 $ foreach {rules/rule}
                        new ReduceAction@index[-sep ','-]
 $ end foreach
index 50fcb57..1057e47 100644 (file)
@@ -94,14 +94,14 @@ private class ControlFlowContext
 
        meth sub: ControlFlowContext
        do
-               return new ControlFlowContext.with(self)
+               return new ControlFlowContext.with_prev(self)
        end
 
        init
        do 
        end
 
-       init with(p: ControlFlowContext)
+       init with_prev(p: ControlFlowContext)
        do
                _prev = p
                _has_return = p.has_return
index 4bd9af5..dd911d7 100644 (file)
@@ -931,7 +931,7 @@ redef class AAttrPropdef
                        n_type.check_visibility(v, _readmethod)
                end
                if n_writable != null then
-                       _writemethod.signature = new MMSignature(new Array[MMType].with(t), null, v.local_class.get_type)
+                       _writemethod.signature = new MMSignature(new Array[MMType].with_items(t), null, v.local_class.get_type)
                        process_and_check(v, _writemethod, n_writable.n_kwredef != null, visibility_level)
                        n_type.check_visibility(v, _writemethod)
                end
index 6096362..d92038c 100644 (file)
@@ -134,13 +134,13 @@ private class VariableContext
        # Build a new VariableContext
        meth sub: SubVariableContext
        do
-               return new SubVariableContext.with(self, null, null)
+               return new SubVariableContext.with_prev(self, null, null)
        end
 
        # Build a nested VariableContext with new variable information
        meth sub_with(v: Variable, t: MMType): SubVariableContext
        do
-               return new SubVariableContext.with(self, v, t)
+               return new SubVariableContext.with_prev(self, v, t)
        end
 
        init
@@ -172,7 +172,7 @@ special VariableContext
                return prev.stype(v)
        end
 
-       init with(p: VariableContext, v: Variable, t: MMType)
+       init with_prev(p: VariableContext, v: Variable, t: MMType)
        do
                init
                _prev = p