Sublime Forum

Creating new language syntax

#1

Hi, all!
I want to add some simple Arduino function to the c/c++ syntax file, creating a new language. I tried to add this Arduino syntax to a copy of the c++ syntax, renaming it and pasting to my user folder. So easy, simply doesn’t work. How can I do?

`- match: \b(HIGH|LOW|INPUT|OUTPUT|INPUT_PULLUP|LED_BUILTIN)\b
      scope: constant.language.arduino
    - match: \b(boolean|word|String|string|array)\b
      scope: storage.type.arduino
    - match: PROGRAM
      scope: storage.modifier.arduino
    - match: \b(Serial|Stream|Keyboard|Mouse)\b
      scope: entity.name.class.arduino
    - match: \b(pinMode|digitalWrite|digitalRead|analogReference|analogRead|analogWrite|analogReadResolution|analogWriteResolution|tone|noTone|shiftOut|shiftIn|pulseIn|millis|micros|delay|delayMicroseconds|min|max|constrain|map|pow|sqrt|sin|cos|tan|isAlphaNumeric|isAlpha|isAscii|isWhitespace|isControl|isDigit|isGraph|isLowerCase|isPrintable|isPunct|isSpace|isUpperCase|isHexadecimalDigit|randomSeed|random|lowByte|highByte|bitRead|bitWrite|bitSet|bitClear|bit|attachInterrupt|detachInterrupt|interrupts|noInterrupts)\b
      scope: entity.name.function.arduino`
0 Likes