From 805d58c6aeeeba3e4989c0eed6781b3861e8fae0 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Thu, 25 Jan 2018 22:39:31 -0800 Subject: 4199 --- html/015literal_noninteger.cc.html | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'html/015literal_noninteger.cc.html') diff --git a/html/015literal_noninteger.cc.html b/html/015literal_noninteger.cc.html index d4fff757..38f25a16 100644 --- a/html/015literal_noninteger.cc.html +++ b/html/015literal_noninteger.cc.html @@ -15,18 +15,17 @@ body { font-size: 12pt; font-family: monospace; color: #aaaaaa; background-color a { color:#eeeeee; text-decoration: none; } a:hover { text-decoration: underline; } * { font-size: 12pt; font-size: 1em; } -.Conceal { color: #4e4e4e; } -.traceContains { color: #008000; } +.cSpecial { color: #008000; } .LineNr { color: #444444; } -.Identifier { color: #c0a020; } .Constant { color: #00a0a0; } +.muRecipe { color: #ff8700; } +.Delimiter { color: #800080; } +.Special { color: #c00000; } +.Identifier { color: #c0a020; } .Normal { color: #aaaaaa; background-color: #080808; padding-bottom: 1px; } .Comment { color: #9090ff; } .Comment a { color:#0000ee; text-decoration:underline; } -.Delimiter { color: #800080; } -.Special { color: #c00000; } -.cSpecial { color: #008000; } -.muRecipe { color: #ff8700; } +.traceContains { color: #008000; } --> @@ -66,7 +65,7 @@ if ('onhashchange' in window) { 3 :(scenarios load) 4 :(scenario noninteger_literal) 5 def main [ - 6 1:number <- copy 3.14159 + 6 1:number <- copy 3.14159 7 ] 8 +parse: ingredient: {3.14159: "literal-fractional-number"} 9 @@ -81,9 +80,9 @@ if ('onhashchange' in window) { 18 :(code) 19 bool is_noninteger(const string& s) { 20 return s.find_first_not_of("0123456789-.") == string::npos // no other characters -21 ¦ ¦ && s.find_first_of("0123456789") != string::npos // at least one digit -22 ¦ ¦ && s.find('-', 1) == string::npos // '-' only at first position -23 ¦ ¦ && std::count(s.begin(), s.end(), '.') == 1; // exactly one decimal point +21 && s.find_first_of("0123456789") != string::npos // at least one digit +22 && s.find('-', 1) == string::npos // '-' only at first position +23 && std::count(s.begin(), s.end(), '.') == 1; // exactly one decimal point 24 } 25 26 double to_double(string n) { -- cgit 1.4.1-2-gfad0