Apply a pattern on the current position and check if it patches. Doesn't touch pos.
# not a function, but a class name and the # part after the dot a function name if scanner.test(r'\s*\.\s*'): token = Name.Class # it's not a dot, our job is done
test is referenced in 0 repositories
def test(self, pattern):