File tree Expand file tree Collapse file tree 2 files changed +144
-210
lines changed Expand file tree Collapse file tree 2 files changed +144
-210
lines changed Original file line number Diff line number Diff line change @@ -911,27 +911,16 @@ impl MachineState {
911
911
use crate :: parser:: lexer:: * ;
912
912
913
913
let nx = self . store ( self . deref ( self . registers [ 2 ] ) ) ;
914
- let add_dot = !string. ends_with ( '.' ) || string. ends_with ( "'." ) ;
915
- let cursor = std:: io:: Cursor :: new ( string) ;
916
-
917
- let iter = std:: io:: Read :: chain ( cursor, {
918
- let mut dot_buf: [ u8 ; '.' . len_utf8 ( ) ] = [ 0u8 ] ;
919
-
920
- if add_dot && !string. ends_with ( '\'' ) {
921
- '.' . encode_utf8 ( & mut dot_buf) ;
922
- }
923
-
924
- std:: io:: Cursor :: new ( dot_buf)
925
- } ) ;
914
+ let iter = std:: io:: Cursor :: new ( string) ;
926
915
927
916
let mut lexer = Lexer :: new ( CharReader :: new ( iter) , self ) ;
928
917
let mut tokens = vec ! [ ] ;
929
918
930
- match lexer. next_token ( ) {
919
+ match lexer. next_number_token ( ) {
931
920
Ok ( token @ Token :: Literal ( Literal :: Atom ( atom ! ( "-" ) ) | Literal :: Char ( '-' ) ) ) => {
932
921
tokens. push ( token) ;
933
922
934
- if let Ok ( token) = lexer. next_token ( ) {
923
+ if let Ok ( token) = lexer. next_number_token ( ) {
935
924
tokens. push ( token) ;
936
925
}
937
926
}
You can’t perform that action at this time.
0 commit comments