Various minor cleanups to WASM code generation
* Add newline function to code_builder * Remove type aliases which made jump to definition less ergonomic * Add types to constants PiperOrigin-RevId: 827863199 Change-Id: Ib4390d398926466ecce491a3d0ebe308ed5e0cbe
This commit is contained in:
committed by
Copybara-Service
parent
10130297c0
commit
c22d94e470
@@ -19,13 +19,11 @@ import pathlib
|
||||
|
||||
from wasm.codegen.helpers import constants
|
||||
|
||||
Path = pathlib.Path
|
||||
|
||||
|
||||
def get_default_output_dir() -> str:
|
||||
"""Gets the default output directory (sibling of 'generated' folder)."""
|
||||
# Get the directory of the current file (generator/base.py)
|
||||
current_dir = Path(__file__).parent
|
||||
current_dir = pathlib.Path(__file__).parent
|
||||
# Go up one level to the project root and then down to 'generated'
|
||||
default_output_dir = str(current_dir.parent / "generated")
|
||||
return default_output_dir
|
||||
|
||||
Reference in New Issue
Block a user