Whoops - abstract member param names may now contain underscores
parent
ac837107c5
commit
021b67bbff
|
@ -1309,7 +1309,7 @@ The subtype must implement at least the number of parameters declared in
|
|||
@itemize
|
||||
@item
|
||||
Each name in @var{params} must be a valid variable name, as satisfied by the
|
||||
regular expression @code{/^[a-z][a-z0-9]*$/i}.
|
||||
regular expression @code{/^[a-z_][a-z0-9_]*$/i}.
|
||||
@item
|
||||
The names are use purely for documentation and are not semantic.
|
||||
@end itemize
|
||||
|
|
|
@ -366,10 +366,10 @@ function verifyAbstractNames( name, params )
|
|||
var i = params.length;
|
||||
while ( i-- )
|
||||
{
|
||||
if ( params[ i ].match( /^[a-z][a-z0-9]*$/i ) === null )
|
||||
if ( params[ i ].match( /^[a-z_][a-z0-9_]*$/i ) === null )
|
||||
{
|
||||
throw SyntaxError(
|
||||
"Member " + name + " contains invalid parameter: '" +
|
||||
"Member " + name + " contains invalid parameter '" +
|
||||
params[ i ] + "'"
|
||||
);
|
||||
}
|
||||
|
|
|
@ -205,7 +205,7 @@ assert.equal(
|
|||
|
||||
assert.doesNotThrow( function()
|
||||
{
|
||||
util.propParse( { 'abstract foo': [ 'valid' ] }, {} );
|
||||
util.propParse( { 'abstract foo': [ 'valid_name' ] }, {} );
|
||||
}, SyntaxError, 'Valid var names as args should not throw exceptions' );
|
||||
} )();
|
||||
|
||||
|
|
Loading…
Reference in New Issue