From: Jean Privat Date: Tue, 15 Feb 2011 13:53:29 +0000 (-0500) Subject: Merge branch 'update_syntax' into next X-Git-Tag: v0.4~8 X-Git-Url: http://nitlanguage.org?hp=685aa62e0aa5a7d17480a28c4a9b1c93f0b85649 Merge branch 'update_syntax' into next --- diff --git a/lib/standard/collection/abstract_collection.nit b/lib/standard/collection/abstract_collection.nit index 76ba515..6f9693b 100644 --- a/lib/standard/collection/abstract_collection.nit +++ b/lib/standard/collection/abstract_collection.nit @@ -85,7 +85,7 @@ interface NaiveCollection[E] redef fun length do var nb = 0 - for i in self do nb += nb + for i in self do nb += 1 return nb end diff --git a/src/parser/lexer.nit b/src/parser/lexer.nit index 8e1b0ec..e66dc87 100644 --- a/src/parser/lexer.nit +++ b/src/parser/lexer.nit @@ -1264,7 +1264,7 @@ class Lexer result = get_token end _token = null - return result.as(not null) + return result end # Get a token, or null if it is discarded @@ -1655,9 +1655,7 @@ class Lexer end end end - if false then break # FIXME remove once unreach loop exits are in c_src end - return null # FIXME remove once unreach loop exits are in c_src end # Read the next character. diff --git a/src/parser/parser.nit b/src/parser/parser.nit index 3a6986f..5f4bd00 100644 --- a/src/parser/parser.nit +++ b/src/parser/parser.nit @@ -122,7 +122,7 @@ class Parser else action_type = parser_action(state, subindex+1) action_value = parser_action(state, subindex+2) - high = low -1 # break + break end end @@ -143,9 +143,7 @@ class Parser var node = new Start(null, node2) return node end - if false then break # FIXME remove once unreach loop exits are in c_src end - abort # FIXME remove once unreach loop exits are in c_src end var _reduce_table: Array[ReduceAction] diff --git a/src/parser/xss/lexer.xss b/src/parser/xss/lexer.xss index a18c223..780a118 100644 --- a/src/parser/xss/lexer.xss +++ b/src/parser/xss/lexer.xss @@ -86,7 +86,7 @@ $ end foreach result = get_token end _token = null - return result.as(not null) + return result end # Get a token, or null if it is discarded @@ -215,9 +215,7 @@ $ end foreach end end end - if false then break # FIXME remove once unreach loop exits are in c_src end - return null # FIXME remove once unreach loop exits are in c_src end # Read the next character. diff --git a/src/parser/xss/parser.xss b/src/parser/xss/parser.xss index 1e96b6a..56c1dfd 100644 --- a/src/parser/xss/parser.xss +++ b/src/parser/xss/parser.xss @@ -135,7 +135,7 @@ class Parser else action_type = parser_action(state, subindex+1) action_value = parser_action(state, subindex+2) - high = low -1 # break + break end end @@ -156,9 +156,7 @@ class Parser var node = new Start(null, node2) return node end - if false then break # FIXME remove once unreach loop exits are in c_src end - abort # FIXME remove once unreach loop exits are in c_src end var _reduce_table: Array[ReduceAction]