Skip to content

Static theme coloring#2476

Open
Grimelios wants to merge 4 commits into
beefytech:masterfrom
Grimelios:static_theme_color
Open

Static theme coloring#2476
Grimelios wants to merge 4 commits into
beefytech:masterfrom
Grimelios:static_theme_color

Conversation

@Grimelios

Copy link
Copy Markdown

Adds a "Static" theme option that colors static variable declarations and their usages. "Static" is a subset of "Member".

Adjusting settings to parse the new color was trivial. Coloring static declarations was also straightforward, utilizing propertyDeclaration->mStaticSpecifier in BfSourceClassifier.cpp. For coloring usages of static variables, I modified BfExprEvaluator.LookupField to optionally provide the relevant BfFieldDef via pointer.

I spot checked a number of files touching static variables in various ways, and everything appears to color correctly. Here's an example from SourceEditWidgetContent.bf, where members are green and statics are red.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant