From 89bc63727fbc521539b248b859570b5b548cafc1 Mon Sep 17 00:00:00 2001 From: Max Wash Date: Sun, 8 Dec 2024 19:37:50 +0000 Subject: [PATCH] doc: remove outdated documentation from sample file --- doc/sample/Person.im | 33 --------------------------------- 1 file changed, 33 deletions(-) diff --git a/doc/sample/Person.im b/doc/sample/Person.im index c451835..0282b46 100755 --- a/doc/sample/Person.im +++ b/doc/sample/Person.im @@ -312,29 +312,6 @@ end /* equivalent 'pure' syntax */ -/** - this example also demonstrates how line continuations are not always - necessary when breaking a statement up over multiple lines. - - the compiler uses a few conditions to determine if it should continue - parsing a particular statement past a line break: - - 1) if the next token immediately after a line break is a label. - 2) if the token immediately before a line break if a binary operator. - 3) if the line break occurs within a set of sub-expression delimiters - (parentheses), lambda delimiters (brackets), package delimiters - (braces), or string delimiters (single or double quotes). - - note that if a line break is encountered in a string constant, - the line break character is included in the string. to prevent - this behaviour, you can precede the line break with a line continuation - character. - - because of the implicit line continuations provided by these conditions, - the following statement requires no explicit line continuations to - be correctly parsed. - **/ - [ v = Int parse:'342' ] on:#err:number_format do:[ :err :data | cout put:'Cannot parse integer string ({err})' @@ -344,16 +321,6 @@ end ]; call. -/** - this example doesn't meet any of the conditions required for implicit - line continuations to be inserted. because of this, it will be treated - as four separate statements. - - there are a few ways this could be fixed: - - 1) surrount the right-hand side of the statement with parentheses. - 2) put a line continuation character at the end of all but the last line. - **/ v = 5 squared squared