From: Jean Privat Date: Mon, 30 Mar 2015 03:07:15 +0000 (+0700) Subject: code: rename identifiers `with` since it is a keyword now X-Git-Tag: v0.7.4~35^2~1 X-Git-Url: http://nitlanguage.org code: rename identifiers `with` since it is a keyword now Signed-off-by: Jean Privat --- diff --git a/lib/sax/helpers/sax_locator_impl.nit b/lib/sax/helpers/sax_locator_impl.nit index eb04677..99d0228 100644 --- a/lib/sax/helpers/sax_locator_impl.nit +++ b/lib/sax/helpers/sax_locator_impl.nit @@ -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 diff --git a/lib/sax/sax_parse_exception.nit b/lib/sax/sax_parse_exception.nit index ae2586b..388febc 100644 --- a/lib/sax/sax_parse_exception.nit +++ b/lib/sax/sax_parse_exception.nit @@ -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 diff --git a/lib/saxophonit/test_saxophonit.nit b/lib/saxophonit/test_saxophonit.nit index 270ed22..c4afbbf 100644 --- a/lib/saxophonit/test_saxophonit.nit +++ b/lib/saxophonit/test_saxophonit.nit @@ -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 diff --git a/lib/socket/socket.nit b/lib/socket/socket.nit index 42c7e00..681e239 100644 --- a/lib/socket/socket.nit +++ b/lib/socket/socket.nit @@ -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 diff --git a/lib/socket/socket_c.nit b/lib/socket/socket_c.nit index 44aff9e..8758cdf 100644 --- a/lib/socket/socket_c.nit +++ b/lib/socket/socket_c.nit @@ -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;