openrat-cms

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit cc44631e95db543bf7c01d9fcbe467a82abfda3f
parent c8b1e04112bce95ba03d008e87e199f0f1c4ebc0
Author: Jan Dankert <develop@jandankert.de>
Date:   Tue,  7 Jun 2022 21:43:48 +0200

Change: DSL Lexer: Allow underscores in Numbers (like in real javascript)

Diffstat:
Mmodules/dsl/DslLexer.class.php | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/dsl/DslLexer.class.php b/modules/dsl/DslLexer.class.php @@ -179,10 +179,10 @@ class DslLexer while( true ) { $char = array_shift( $chars ); if ( ( $char >= '0' && $char <= '9') || - $char == '.' ) { + $char == '.' || $char == '_' ) { $value .= $char; } else { - $this->addToken( $line,DslToken::T_NUMBER,$value ); + $this->addToken( $line,DslToken::T_NUMBER,str_replace('_','',$value )); array_unshift($chars,$char); break; }