add #inline
This commit is contained in:
parent
e5d4de3912
commit
5d048eb69d
@ -555,6 +555,7 @@ pub mod white_space {
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
];
|
||||
#[inline]
|
||||
pub fn lookup(c: char) -> bool {
|
||||
match c as u32 >> 8 {
|
||||
0 => WHITESPACE_MAP[c as usize & 0xff] & 1 != 0,
|
||||
|
@ -63,6 +63,7 @@ pub fn emit_cascading_map(&mut self, ranges: &[Range<u32>]) -> bool {
|
||||
.unwrap();
|
||||
self.bytes_used += 256;
|
||||
|
||||
writeln!(&mut self.file, "#[inline]").unwrap();
|
||||
writeln!(&mut self.file, "pub fn lookup(c: char) -> bool {{").unwrap();
|
||||
writeln!(&mut self.file, " match c as u32 >> 8 {{").unwrap();
|
||||
for arm in arms {
|
||||
|
Loading…
Reference in New Issue
Block a user