Ivan Krysak
c6e38cd485
Return to using constant name builders
...
Because of how name builders used to lazy gather namespaces on the first
requested name, the objects were self mutating. As such only non-const
references could be used to pass them around.
Since that is no longer the case, this restores most of lost const
qualifiers.
2025-04-17 11:19:17 +03:00
Ivan Krysak
57b5eb7f98
NameBuilder: allow different name checkers
2025-04-17 11:19:17 +03:00
Ivan Krysak
3edb6cbb9b
Minor improvements
2025-04-15 16:35:42 +03:00
Ivan Krysak
705e4a5955
auto [...] -> auto &&[...]
2025-02-13 13:10:51 +02:00
Ivan Krysak
9082c500cb
IndentedOstream: introduce currentIndentation()
2025-02-13 13:09:50 +02:00
Ivan Krysak
d4ab801ab7
Rename range_with_value_type into RangeOf
...
Original name was reminiscent of the STL, but there's no such concept
in there, as such it's probably better to use revng naming convention
instead.
2025-02-13 13:09:50 +02:00
Ivan Krysak
1c9b6a70db
PTML: add statement comment support
2025-02-13 13:09:50 +02:00
Ivan Krysak
a4550ce7e6
PTML: introduce comment placement helper
2025-02-13 13:09:50 +02:00
Ivan Krysak
288448f009
Never include model::VerifyHelper from headers
2025-02-13 13:09:50 +02:00
Ivan Krysak
929cb4b35b
Minor improvements
2025-02-13 13:09:50 +02:00
Ivan Krysak
a67ba96644
Adopt name builder across the model users
2024-11-06 15:43:13 +02:00
Ivan Krysak
99e966f6e8
ptml::TagBuilder: rename GenerateTagLessPTML
...
The new name is `IsInTaglessMode`.
This also makes it public, since their no point of keeping a const
option private.
2024-10-15 09:12:55 +02:00
Ivan Krysak
c057ba335e
ptml::IndentedOstream: accept a builder reference
...
This avoids the need to have duplicated builders in cases were we
already have one at the cost of always having to manually create one.
2024-10-15 09:12:55 +02:00
Ivan Krysak
9ebe98e5c8
PTMLIndentedOstream: rename into IndentedOstream
2024-10-15 09:12:55 +02:00
Ivan Krysak
ec19b26ee9
PTMLBuilder: rename into ptml::MarkupBuilder
2024-10-15 09:12:55 +02:00
Alessandro Di Federico
2cdedc71f4
s/serialize/toString/
...
We keep serialize for method dealing with streams.
If it returns a `std::string`, let's use `toString`.
2024-09-27 12:07:17 +02:00
Ivan Krysak
51208789a0
Rename ThePTMLBuilder into just B
2024-06-27 11:05:51 +02:00
Ivan Krysak
b25a32de2a
Stop using std:: prefix for std::size_t
2024-01-29 11:57:54 +02:00
Giacomo Vercesi
92e90d554c
PTML/Constants.h: add editType action
2024-01-26 19:13:58 +01:00
Giacomo Vercesi
db1691b03f
Adopt new PTML tags
...
Change the emitted disassembly to include the
`data-action-context-location` and `data-name-of` tags.
2023-11-03 16:30:40 +01:00
Giacomo Vercesi
f77d4d6d1f
PTML: introduce data-scope-location
...
Introduce the new `data-scope-location` tag that's to be used for
switching between C and ASM. Include the tag when generating ASM
instructions.
2023-07-31 16:05:51 +02:00
Ivan Krysak
ed4efb0bd9
yield::ptml: add functionComment function
2023-07-21 17:25:24 +02:00
Ivan Krysak
18204ccb9f
yield::ptml: add comment function
...
This is a generic way to format an arbitrary type with `Comment`
field as a comment and emit it using PTML.
2023-07-21 17:25:24 +02:00
Ivan Krysak
0c8a5aaffb
Model: move edit path helpers in from PTML
2023-07-21 17:25:24 +02:00
Ivan Krysak
a123ec2c35
Remove clang-format off around concepts
...
Now that clang-format no longer breaks anything involving a concept or
a requires clause on sight, these are no longer necessary
2023-07-02 13:20:49 +02:00
Ivan Krysak
bc98e0079f
Formatting: change PenaltyReturnTypeOnItsOwnLine
...
The new value is 21.
2023-07-02 13:20:49 +02:00
Djordje Todorovic
f05c08547d
ptml: Introduce PTMLBuilder class
...
By using this class we can create ptml::Tags without
XML tags. It is useful in the revng-c part when we
want to generate Plain C. All PTML Tags, from now on,
should be created via this class only.
In addition, port `Yield` library to be using this.
2023-06-09 17:15:30 +02:00
Alessandro Di Federico
52521f8cac
Adopt more standard library's features
2023-04-08 08:42:23 +02:00
Alessandro Di Federico
b2f22c168f
Adopt clang-format 16
2023-04-08 08:42:23 +02:00
Pietro Fezzardi
fb7edef129
Add ptml::scopeTag helper function
2022-11-15 14:15:20 +01:00
Ivan Krysak
00dc8dd477
PTMLTag: fix addListAttribute's requires clause
2022-09-26 10:33:43 +02:00
Giacomo Vercesi
7cff7737ac
Introduce ModelHelpers.h
...
ModelHelpers contains helper functions that produce the appropiate
edit path for the given elements of the model.
2022-09-01 17:46:40 +02:00
Giacomo Vercesi
b7a23dcd4a
Rename and improve ptml::TagScope
...
Renames ptml::TagScope to ScopeTag and fixes issue when Tag.scope
was called with a temporary.
2022-09-01 17:46:10 +02:00
Giacomo Vercesi
84e29d6b96
Fix linkage of Tag::scope in Tag.h
2022-09-01 15:49:44 +02:00
Ivan Krysak
65d1a016d4
Standardize concept naming across the codebase
2022-08-05 17:27:56 +03:00
Giacomo Vercesi
efc2d36a14
Introduce ptml namespace
...
The `ptml` namespace contains utilities for easier PTML manipulation.
These include:
* A few constants (e.g. standard attributes) available in
`revng/PTML/Constants.h`
* The `Tag` class to easily construct html/xml tags with attributes
without having to use format strings.
* The `PTMLIndentedOstream`, a llvm::raw_ostream wrapper that
automatically adds tagged indentation to the output
2022-07-28 08:47:17 +02:00