Comments (3)
Note we may want to re-open or file a new issue for just "protobuf to DSLX conversion produces really long literals in a single line" -- we could do something temporary before we have a full auto formatting solution of any kind that a) assumes infinite line length and b) just causes appropriate newlines-each-struct-field-with-indent/dedent to happen when the serialized single-line version is beyond a certain length (say 80 chars). cc @RobSpringer will leave up to you how to track that one best.
from xls.
Note that most DSLX "language tests" have auto-formatting enabled as of eb08413 -- there are about four .x files in the repo that cannot be successfully auto-formatted now, will try to knock those out next week and have std.x
be auto-formatted (with a test that it remains auto-formatted).
WIP binary is dslx_fmt
https://github.com/google/xls/blob/d445fc4f61bd3569c309c4d8b962145ad83efe0c/xls/dslx/dslx_fmt.cc
from xls.
I'd consider it fairly complete now -- notably most remaining holes are due to the fact comments can go in the middle of constructs at arbitrary spots. To handle that large space of possibilities we could "mark" comments from the original source text runs as being formatted properly and give an error return code if there exist any unhandled comments from the original text. But I think I can largely claim this is complete, even given the few comment-formatting escapes and some remaining 100-char escapes it mostly does what we're looking for.
from xls.
Related Issues (20)
- Expose Single Value Channels in DSLX frontend
- internal error instead of syntax error when doing invalid struct update
- [dslx:fmt] Add invariant checking to dslx_fmt tool
- Enhancement: DSLX: Create a tool to generate proc tests automatically
- ENHANCEMENT: DSLX: Let formatting bazel rule `xls_dslx_fmt_test` accept lists as input
- Section groupings with individual header comment in enums are not preserved
- Inline comments on enums values are moved HOT 1
- Dead pointers are sometimes keys in streaming_io_and_pipeline.node_to_stage_map
- DSLX `enumerate` function not working correctly
- Dead pointers may be present in at streaming_io_and_pipeline.pipeline_registers during codegen
- Suggested Documentation Changes to "DSLX Tutorial: Intro to procs"
- dslx_reference improvements HOT 2
- enhancement: Allow for proc-level type definitions
- Enhance tracing/logging
- Move codegen metadata into IR HOT 1
- XLS should support instantiating proc-based FFI
- Proc parametric results in a typeinfo error
- IR Function converter for built in expressions assumes that immediate expression is an Array HOT 1
- DSLX should be able to infer parameters from channel types
- [Documentation] Parameters of bazel rules and macros overflow
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xls.