Skip to content

Some keywords (type, CONSTANT) are not properly coloured in editor #380

Open
@ubidefeo

Description

@ubidefeo

Describe the problem

The IDE uses a standard C++ syntax highlighting system. The result is that some keywords/types/CONSTANTS that are specific to the Arduino programming language do not get syntax highlighting in the Arduino IDE editor.

Examples include:

  • byte
  • OUTPUT
  • INPUT
  • INPUT_PULLUP
  • LOW
  • HIGH

To Reproduce

Steps to reproduce the behavior:

  1. Create a Sketch
  2. Replace its content with the following
    byte myNumber = 0;
    void setup() {
      pinMode(LED_BUILTIN, OUTPUT);
      pinMode(3, INPUT);
    }
    void loop() {
      digitalWrite(LED_BUILTIN, HIGH);
      delay(500);
      digitalWrite(LED_BUILTIN, LOW);
      delay(500);
    }

Expected behavior

Syntax highlighting is provided for all keywords of the Arduino programming language.

Arduino IDE version

2.0.0-beta.7

Operating system

All

Additional context

Note that highlighting for many of the Arduino language keywords are already provided by the C++ highlighter. No special treatment for those keywords is necessary.


Also reported at:

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the latest nightly build
  • My report contains all necessary details

Metadata

Metadata

Assignees

Labels

criticality: mediumOf moderate impacttopic: codeRelated to content of the project itselftype: imperfectionPerceived defect in any part of project

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions