Repository navigation
Support (module definition ...) constructs - #2829
Conversation
|
Does this replace #2666? Is it an alternative implementation? |
| class TextScriptModule : public ScriptModuleMixin<ScriptModuleType::Text> { | ||
| public: | ||
| const Location& location() const override { return module.loc; } | ||
| bool IsDefinition() const override { return is_definition; } |
There was a problem hiding this comment.
Any reason to just just make is_definition a public field on ScriptModule? i.e. do we need to use a virtual method here?
There was a problem hiding this comment.
No. I will change this.
There was a problem hiding this comment.
The code is even simpler this way.
sbc100
left a comment
There was a problem hiding this comment.
Nice! A surprisingly small patch to make this work.
|
Yes this is a replacement. |
| @@ -1,4 +1,4 @@ | |||
| /* C++ code produced by gperf version 3.2.1 */ | |||
| /* C++ code produced by gperf version 3.3 */ | |||
There was a problem hiding this comment.
I guess we do not pin the exact version that we use here?
There was a problem hiding this comment.
I don't know. Shall I use an older one?
There was a problem hiding this comment.
I have downloaded and compiled a 3.2.1 gperf from here: https://ftp.gnu.org/gnu/gperf/
Anyway the README says this:
## Adding new keywords to the lexer
If you want to add new keywords, you'll need to install
[gperf](https://www.gnu.org/software/gperf/). Before you upload your PR, please
run `make update-gperf` to update the prebuilt C++ sources in `src/prebuilt/`.
If we want to use a specific gperf version, we should add its version here.
There was a problem hiding this comment.
Sorry, yes this change seems fine. I was just wondering if we used a pinned version, for consistency, but its seems we don't. Not a huge deal i think,
There was a problem hiding this comment.
Newer versions likely fix some issues. I think the only rule we should use is that we never go back to older gperf. Otherwise file updates will be chaos.
Related patch: #2666