-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5d53960
commit 44b1172
Showing
1 changed file
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import sys | ||
|
||
from pyslang import * | ||
|
||
|
||
def main(): | ||
# Create a slang driver with default command line arguments | ||
driver = Driver() | ||
driver.addStandardArgs() | ||
|
||
# Parse command line arguments | ||
args = " ".join(sys.argv) | ||
if not driver.parseCommandLine(args, CommandLineOptions()): | ||
return | ||
|
||
# Process options and parse all provided sources | ||
if not driver.processOptions() or not driver.parseAllSources(): | ||
return | ||
|
||
# Perform elaboration and report all diagnostics | ||
compilation = driver.createCompilation() | ||
driver.reportCompilation(compilation, False) | ||
|
||
|
||
if __name__ == "__main__": | ||
main() |