diff options
| author | edwardcwang | 2020-04-10 17:26:47 +0000 |
|---|---|---|
| committer | GitHub | 2020-04-10 10:26:47 -0700 |
| commit | 18d5154c83f9af99ff0c90d6b2c1329af4f1a949 (patch) | |
| tree | cc459f61a8c92f083dd3993269ba929e0058d401 /src | |
| parent | 1a03e6356e451136d522d5a9acba374dd8972b24 (diff) | |
Support infoMode for Strings (#782)
* Support infoMode for Strings
It seemed like an API hole that I couldn't use infoMode with a string but had to manually create an iterator first.
* Fix build error
Co-authored-by: Jim Lawson <ucbjrl@berkeley.edu>
Diffstat (limited to 'src')
| -rw-r--r-- | src/main/scala/firrtl/Parser.scala | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main/scala/firrtl/Parser.scala b/src/main/scala/firrtl/Parser.scala index 0388c453..d3075cbb 100644 --- a/src/main/scala/firrtl/Parser.scala +++ b/src/main/scala/firrtl/Parser.scala @@ -104,6 +104,10 @@ object Parser extends LazyLogging { circuit.modules.head.ports.head.tpe } + def parse(lines: Seq[String], infoMode: InfoMode): Circuit = parse(lines.iterator, infoMode) + + def parse(text: String, infoMode: InfoMode): Circuit = parse(text split "\n", infoMode) + /** Parse the concrete syntax of a FIRRTL [[firrtl.ir.Expression]], e.g. * "add(x, y)" becomes: * {{{ |
