code: rename identifiers `with` since it is a keyword now
authorJean Privat <jean@pryen.org>
Mon, 30 Mar 2015 03:07:15 +0000 (10:07 +0700)
committerJean Privat <jean@pryen.org>
Fri, 3 Apr 2015 07:59:19 +0000 (14:59 +0700)
Signed-off-by: Jean Privat <jean@pryen.org>

lib/sax/helpers/sax_locator_impl.nit
lib/sax/sax_parse_exception.nit
lib/saxophonit/test_saxophonit.nit
lib/socket/socket.nit
lib/socket/socket_c.nit

index eb04677..99d0228 100644 (file)
@@ -29,7 +29,7 @@ import sax::sax_locator
 #      redef fun start_document do
 #              # save the location of the start of the document
 #              # for future use.
-#              start_loc = new SAXLocatorImpl.with(locator)
+#              start_loc = new SAXLocatorImpl.from(locator)
 #      end
 #     end
 #
@@ -62,7 +62,7 @@ class SAXLocatorImpl super SAXLocator
        # Parameters:
        #
        # * `locator`: locator to copy.
-       init with(locator: SAXLocator) do
+       init from(locator: SAXLocator) do
                public_id = locator.public_id
                system_id = locator.system_id
                line_number = locator.line_number
index ae2586b..388febc 100644 (file)
@@ -88,7 +88,7 @@ class SAXParseException
        # caused the error or warning.
        # * `column_number`: column number of the end of the text that
        # caused the error or warning.
-       init with(message: String, public_id: nullable String,
+       init with_info(message: String, public_id: nullable String,
                        system_id: nullable String, line_number: Int, column_number: Int) do
                init(message)
                self.public_id = public_id
index 270ed22..c4afbbf 100644 (file)
@@ -50,7 +50,7 @@ class TestSaxophonit
                expected.document_locator = new SAXLocatorImpl
                expected.start_document
                expected.start_element("", "a", "a", new AttributesImpl)
-               expected.fatal_error(new SAXParseException.with(
+               expected.fatal_error(new SAXParseException.with_info(
                                "The type in the closing tag (`b`) does not match the type " +
                                "in the opening tag (`a`).", null, null, 1, 8))
                expected.end_document
index 42c7e00..681e239 100644 (file)
@@ -204,7 +204,7 @@ class TCPServer
                        closed = true
                        return
                end
-               addrin = new NativeSocketAddrIn.with(port, new NativeSocketAddressFamilies.af_inet)
+               addrin = new NativeSocketAddrIn.with_port(port, new NativeSocketAddressFamilies.af_inet)
                address = addrin.address
 
                # Bind it
index 44aff9e..8758cdf 100644 (file)
@@ -238,7 +238,7 @@ extern class NativeSocketAddrIn `{ struct sockaddr_in* `}
                return sai;
        `}
 
-       new with(port: Int, family: NativeSocketAddressFamilies) `{
+       new with_port(port: Int, family: NativeSocketAddressFamilies) `{
                struct sockaddr_in *sai = NULL;
                sai = malloc(sizeof(struct sockaddr_in));
                sai->sin_family = family;