================
@@ -119,16 +136,89 @@ def define_selector(n, name):
# Compiler.
################################################################################
+_SIGNATURE_LABEL = re.compile(f"@(?:{SIGNATURE_NAMES}):$")
+
+
+def _tokenize(assembler: str) -> list[str]:
+ """Convert string of assembly into tokens."""
+ # With one exception, tokens are simply sequences of non-space characters.
+ # The one exception is string literals, which may have spaces.
+
+ # To parse strings, which can contain escaped contents, use a "Friedl
+ # unrolled loop". The high level of such a regex is:
+ # open normal* ( special normal* )* close
+ # which for string literals is:
+ string_literal = r'" [^"\\]* (?: \\. [^"\\]* )* "'
----------------
kastiglione wrote:
I'm not sure I'm understanding your feedback. Are you saying I need to make a
change? Or commenting on the fact that regex limitations don't happen to apply
in this case?
https://github.com/llvm/llvm-project/pull/183804
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits