From 0df19c03c721d4ef214b335445a530dbfa66d570 Mon Sep 17 00:00:00 2001 From: dos-reis Date: Fri, 13 May 2011 09:29:07 +0000 Subject: * boot/utility.boot (charPosition): New. * boot/scanner.boot (shoeAccumulateLines): Use it. (shoeS): Likewise. --- src/boot/scanner.boot | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/boot/scanner.boot') diff --git a/src/boot/scanner.boot b/src/boot/scanner.boot index e1f6bd0b..841d26db 100644 --- a/src/boot/scanner.boot +++ b/src/boot/scanner.boot @@ -135,8 +135,7 @@ shoeAccumulateLines(s,string)== command and #command>0 => stringChar(command,0) = char ";" => shoeAccumulateLines($r,string) - a:=STRPOS('";",command,0,nil) - a=> + a := charPosition(char ";",command,0) => shoeAccumulateLines($r, strconc(string,subString(command,0,a-1))) shoeAccumulateLines($r,strconc(string,command)) @@ -314,8 +313,8 @@ shoeS()== SoftShoeError([$linepos,:$n],'"quote added") '"" n := $n - strsym := STRPOS ('"_"",$ln,$n,nil) or $sz - escsym := STRPOS ('"__",$ln,$n,nil) or $sz + strsym := charPosition(char "_"",$ln,$n) or $sz + escsym := charPosition(char "__",$ln,$n) or $sz mn := MIN(strsym,escsym) mn=$sz => $n:=$sz -- cgit v1.2.3