selfhost/cmd/w6a: drop snake_case from lex/parse/asm/obj exports
This commit is contained in:
@@ -4,25 +4,25 @@
|
||||
// itself is in parse.ww; here we keep tokenisers for identifiers and
|
||||
// numbers so parse.ww stays focused on syntax.
|
||||
|
||||
export fn a_isidstart(c: i32) bool = {
|
||||
export fn isidstart(c: i32) bool = {
|
||||
if (c == 95) { return true; };
|
||||
if (c >= 65) { if (c <= 90) { return true; }; }; // A-Z
|
||||
if (c >= 97) { if (c <= 122) { return true; }; }; // a-z
|
||||
return false;
|
||||
};
|
||||
|
||||
export fn a_isidcont(c: i32) bool = {
|
||||
if (a_isidstart(c)) { return true; };
|
||||
export fn isidcont(c: i32) bool = {
|
||||
if (isidstart(c)) { return true; };
|
||||
if (c >= 48) { if (c <= 57) { return true; }; }; // 0-9
|
||||
if (c == 46) { return true; }; // .
|
||||
return false;
|
||||
};
|
||||
|
||||
// a_parsenum — read a leading [+-]?[0x|0X|0]?digits from p[0..n-1].
|
||||
// parsenum — read a leading [+-]?[0x|0X|0]?digits from p[0..n-1].
|
||||
// Returns (value, consumed). Stops at first non-digit.
|
||||
// Plain Plan 9-style: $123 / $0x1f / $-7. Decimal default; 0x prefix
|
||||
// for hex; 0 prefix for octal when followed by a digit (else just 0).
|
||||
export fn a_parsenum(p: *u8, n: u64) (i64, u64) = {
|
||||
export fn parsenum(p: *u8, n: u64) (i64, u64) = {
|
||||
let i: u64 = 0u64;
|
||||
let neg: bool = false;
|
||||
if (i < n) {
|
||||
|
||||
Reference in New Issue
Block a user