Skip to content
Snippets Groups Projects
Commit adabd571 authored by Martin Nilsson's avatar Martin Nilsson
Browse files

Fixed another type bug.

Rev: lib/modules/Tools.pmod/Hilfe.pmod:1.155
Rev: lib/modules/Tools.pmod/testsuite.in:1.26
parent 09bfa2e9
No related branches found
No related tags found
No related merge requests found
......@@ -4,7 +4,7 @@
// Incremental Pike Evaluator
//
constant cvs_version = ("$Id: Hilfe.pmod,v 1.154 2008/06/06 22:01:24 grubba Exp $");
constant cvs_version = ("$Id: Hilfe.pmod,v 1.155 2008/06/12 16:57:43 nilsson Exp $");
constant hilfe_todo = #"List of known Hilfe bugs/room for improvements:
- Hilfe can not handle enums.
......@@ -1079,7 +1079,9 @@ class Expression {
// Any sequence beginning with any of these can't be
// a type declaration.
if( (< "break", "continue", "class", "!", "-",
"(", "~", "[", "`", "else" >)[ t ] )
"(", "~", "[", "`", "else", ".." >)[ t ] )
return -1;
if( t[0]>='0' && t[0]<='9' )
return -1;
if( notype[ t ] )
return -1;
......
START_MARKER
// $Id: testsuite.in,v 1.25 2008/05/31 11:29:47 grubba Exp $
// $Id: testsuite.in,v 1.26 2008/06/12 16:57:43 nilsson Exp $
// Tools.Hilfe
define(test_hilfe_setup_low,[[test_do([[
......@@ -186,6 +186,9 @@ test_hilfe("class B { int i; void create(int x) { i=x; } }", "")
test_hilfe("object b=B(3);", "")
test_hilfe("b->i;", "3");
test_hilfe("sscanf(\"abc\"[0..2],\"%s\",string s);", "1")
test_hilfe("s;","\"abc\"")
test_do( add_constant("testhilfe") )
test_true([[ Tools.Hilfe.StdinHilfe ]])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment