()
| 60 | |
| 61 | |
| 62 | def main() -> None: |
| 63 | parser = argparse.ArgumentParser() |
| 64 | parser.add_argument( |
| 65 | "--chroma-dir", |
| 66 | default="../chroma", |
| 67 | ) |
| 68 | args = parser.parse_args() |
| 69 | lexer_dir = Path(f"{args.chroma_dir}/lexers/embedded/") |
| 70 | tree = ET.parse(lexer_dir / "postgresql_sql_dialect.xml") |
| 71 | root = tree.getroot() |
| 72 | if not root: |
| 73 | raise RuntimeError("Could not find root element") |
| 74 | set_keywords(root) |
| 75 | set_config(root) |
| 76 | ET.indent(root, " ") |
| 77 | tree.write(lexer_dir / "materialize_sql_dialect.xml", encoding="unicode") |
| 78 | |
| 79 | |
| 80 | if __name__ == "__main__": |
no test coverage detected