File tree Expand file tree Collapse file tree 1 file changed +17
-13
lines changed Expand file tree Collapse file tree 1 file changed +17
-13
lines changed Original file line number Diff line number Diff line change @@ -966,19 +966,23 @@ fn literal(input: Cursor) -> PResult<Literal> {
966
966
}
967
967
}
968
968
969
- named ! ( literal_nocapture -> ( ) , alt!(
970
- string
971
- |
972
- byte_string
973
- |
974
- byte
975
- |
976
- character
977
- |
978
- float
979
- |
980
- int
981
- ) ) ;
969
+ fn literal_nocapture ( input : Cursor ) -> PResult < ( ) > {
970
+ if let Ok ( ok) = string ( input) {
971
+ Ok ( ok)
972
+ } else if let Ok ( ok) = byte_string ( input) {
973
+ Ok ( ok)
974
+ } else if let Ok ( ok) = byte ( input) {
975
+ Ok ( ok)
976
+ } else if let Ok ( ok) = character ( input) {
977
+ Ok ( ok)
978
+ } else if let Ok ( ok) = float ( input) {
979
+ Ok ( ok)
980
+ } else if let Ok ( ok) = int ( input) {
981
+ Ok ( ok)
982
+ } else {
983
+ Err ( LexError )
984
+ }
985
+ }
982
986
983
987
fn string ( input : Cursor ) -> PResult < ( ) > {
984
988
let input = skip_whitespace ( input) ;
You can’t perform that action at this time.
0 commit comments