MCPcopy Create free account
hub / github.com/dylan-sutton-chavez/edge-python / scan_exponent

Method scan_exponent

compiler/src/modules/lexer/scan.rs:101–115  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

99
100 #[inline]
101 fn scan_exponent(&mut self) -> bool {
102 if self.pos < self.src.len() && matches!(self.src[self.pos], b'e' | b'E') {
103 self.pos += 1;
104 if self.pos < self.src.len() && matches!(self.src[self.pos], b'+' | b'-') {
105 self.pos += 1;
106 }
107 let body_start = self.pos;
108 self.scan_digits();
109 /* Format specs reuse `e/E` (e.g. `.2e`); leave empty-exponent detection to the float parser instead of erroring at lex time. */
110 self.check_digits(body_start, self.pos, true);
111 true
112 } else {
113 false
114 }
115 }
116
117 fn scan_number(&mut self, start: usize) -> TokenType {
118 if self.src[start] == b'0' && self.pos < self.src.len() {

Callers 2

scan_numberMethod · 0.80
scan_dot_numberMethod · 0.80

Calls 3

scan_digitsMethod · 0.80
check_digitsMethod · 0.80
lenMethod · 0.45

Tested by

no test coverage detected