From 057bf6391d3183ba7b2963b44a10852991e85a95 Mon Sep 17 00:00:00 2001 From: agdl Date: Mon, 29 Feb 2016 09:26:40 +0100 Subject: [PATCH] This fixes #4572 --- .../processing/app/syntax/PdeKeywords.java | 6 +- build/shared/lib/keywords.txt | 218 +++++++++--------- 2 files changed, 114 insertions(+), 110 deletions(-) diff --git a/app/src/processing/app/syntax/PdeKeywords.java b/app/src/processing/app/syntax/PdeKeywords.java index 176e5795e..6d642b6a9 100644 --- a/app/src/processing/app/syntax/PdeKeywords.java +++ b/app/src/processing/app/syntax/PdeKeywords.java @@ -148,7 +148,11 @@ public class PdeKeywords { if (!keywordTokenTypeAsString.containsKey(keyword)) { if ("KEYWORD1".equals(oldTokenEntry.getValue())) { parseRSyntaxTextAreaTokenType("DATA_TYPE", keyword); - } else { + } + else if ("LITERAL1".equals(oldTokenEntry.getValue())) { + parseRSyntaxTextAreaTokenType("RESERVED_WORD_2", keyword); + } + else { parseRSyntaxTextAreaTokenType("FUNCTION", keyword); } } diff --git a/build/shared/lib/keywords.txt b/build/shared/lib/keywords.txt index 9ac3e905a..a89b7a1a7 100644 --- a/build/shared/lib/keywords.txt +++ b/build/shared/lib/keywords.txt @@ -1,119 +1,119 @@ #FUNCTIONS COLOR #D35400 - ORANGE KEYWORD1 #FUNCTIONS COLOR #D35400 - ORANGE KEYWORD2 -#STRUCTURE COLORS #728E00 - GREEN KEYWORD3 -#VARIABLES COLOR #00979C - BLUE LITERAL2 +#STRUCTURE COLORS #728E00 - GREEN KEYWORD3 +#VARIABLES COLOR #00979C - BLUE LITERAL1 -# LITERAL2 specifies constants +# LITERAL1 specifies constants -HIGH LITERAL2 Constants RESERVED_WORD_2 -LOW LITERAL2 Constants RESERVED_WORD_2 -INPUT LITERAL2 Constants RESERVED_WORD_2 -INPUT_PULLUP LITERAL2 Constants RESERVED_WORD_2 -OUTPUT LITERAL2 Constants RESERVED_WORD_2 -DEC LITERAL2 Serial_Print RESERVED_WORD_2 -BIN LITERAL2 Serial_Print RESERVED_WORD_2 -HEX LITERAL2 Serial_Print RESERVED_WORD_2 -OCT LITERAL2 Serial_Print RESERVED_WORD_2 -PI LITERAL2 RESERVED_WORD_2 -HALF_PI LITERAL2 RESERVED_WORD_2 -TWO_PI LITERAL2 RESERVED_WORD_2 -LSBFIRST LITERAL2 ShiftOut RESERVED_WORD_2 -MSBFIRST LITERAL2 ShiftOut RESERVED_WORD_2 -CHANGE LITERAL2 AttachInterrupt RESERVED_WORD_2 -FALLING LITERAL2 AttachInterrupt RESERVED_WORD_2 -RISING LITERAL2 AttachInterrupt RESERVED_WORD_2 -DEFAULT LITERAL2 AnalogReference RESERVED_WORD_2 -EXTERNAL LITERAL2 AnalogReference RESERVED_WORD_2 -INTERNAL LITERAL2 AnalogReference RESERVED_WORD_2 -INTERNAL1V1 LITERAL2 AnalogReference RESERVED_WORD_2 -INTERNAL2V56 LITERAL2 AnalogReference RESERVED_WORD_2 -LED_BUILTIN LITERAL2 Constants RESERVED_WORD_2 -LED_BUILTIN_RX LITERAL2 Constants RESERVED_WORD_2 -LED_BUILTIN_TX LITERAL2 Constants RESERVED_WORD_2 +HIGH LITERAL1 Constants RESERVED_WORD_2 +LOW LITERAL1 Constants RESERVED_WORD_2 +INPUT LITERAL1 Constants RESERVED_WORD_2 +INPUT_PULLUP LITERAL1 Constants RESERVED_WORD_2 +OUTPUT LITERAL1 Constants RESERVED_WORD_2 +DEC LITERAL1 Serial_Print RESERVED_WORD_2 +BIN LITERAL1 Serial_Print RESERVED_WORD_2 +HEX LITERAL1 Serial_Print RESERVED_WORD_2 +OCT LITERAL1 Serial_Print RESERVED_WORD_2 +PI LITERAL1 RESERVED_WORD_2 +HALF_PI LITERAL1 RESERVED_WORD_2 +TWO_PI LITERAL1 RESERVED_WORD_2 +LSBFIRST LITERAL1 ShiftOut RESERVED_WORD_2 +MSBFIRST LITERAL1 ShiftOut RESERVED_WORD_2 +CHANGE LITERAL1 AttachInterrupt RESERVED_WORD_2 +FALLING LITERAL1 AttachInterrupt RESERVED_WORD_2 +RISING LITERAL1 AttachInterrupt RESERVED_WORD_2 +DEFAULT LITERAL1 AnalogReference RESERVED_WORD_2 +EXTERNAL LITERAL1 AnalogReference RESERVED_WORD_2 +INTERNAL LITERAL1 AnalogReference RESERVED_WORD_2 +INTERNAL1V1 LITERAL1 AnalogReference RESERVED_WORD_2 +INTERNAL2V56 LITERAL1 AnalogReference RESERVED_WORD_2 +LED_BUILTIN LITERAL1 Constants RESERVED_WORD_2 +LED_BUILTIN_RX LITERAL1 Constants RESERVED_WORD_2 +LED_BUILTIN_TX LITERAL1 Constants RESERVED_WORD_2 -DIGITAL_MESSAGE LITERAL2 Constants RESERVED_WORD_2 -FIRMATA_STRING LITERAL2 Constants RESERVED_WORD_2 -ANALOG_MESSAGE LITERAL2 Constants RESERVED_WORD_2 -REPORT_DIGITAL LITERAL2 Constants RESERVED_WORD_2 -REPORT_ANALOG LITERAL2 Constants RESERVED_WORD_2 -SET_PIN_MODE LITERAL2 Constants RESERVED_WORD_2 -SYSTEM_RESET LITERAL2 Constants RESERVED_WORD_2 -SYSEX_START LITERAL2 Constants RESERVED_WORD_2 +DIGITAL_MESSAGE LITERAL1 Constants RESERVED_WORD_2 +FIRMATA_STRING LITERAL1 Constants RESERVED_WORD_2 +ANALOG_MESSAGE LITERAL1 Constants RESERVED_WORD_2 +REPORT_DIGITAL LITERAL1 Constants RESERVED_WORD_2 +REPORT_ANALOG LITERAL1 Constants RESERVED_WORD_2 +SET_PIN_MODE LITERAL1 Constants RESERVED_WORD_2 +SYSTEM_RESET LITERAL1 Constants RESERVED_WORD_2 +SYSEX_START LITERAL1 Constants RESERVED_WORD_2 -auto LITERAL2 RESERVED_WORD_2 -int8_t LITERAL2 RESERVED_WORD_2 -int16_t LITERAL2 RESERVED_WORD_2 -int32_t LITERAL2 RESERVED_WORD_2 -int64_t LITERAL2 RESERVED_WORD_2 -uint8_t LITERAL2 RESERVED_WORD_2 -uint16_t LITERAL2 RESERVED_WORD_2 -uint32_t LITERAL2 RESERVED_WORD_2 -uint64_t LITERAL2 RESERVED_WORD_2 +auto LITERAL1 RESERVED_WORD_2 +int8_t LITERAL1 RESERVED_WORD_2 +int16_t LITERAL1 RESERVED_WORD_2 +int32_t LITERAL1 RESERVED_WORD_2 +int64_t LITERAL1 RESERVED_WORD_2 +uint8_t LITERAL1 RESERVED_WORD_2 +uint16_t LITERAL1 RESERVED_WORD_2 +uint32_t LITERAL1 RESERVED_WORD_2 +uint64_t LITERAL1 RESERVED_WORD_2 -char16_t LITERAL2 RESERVED_WORD_2 -char32_t LITERAL2 RESERVED_WORD_2 -operator LITERAL2 RESERVED_WORD_2 -enum LITERAL2 RESERVED_WORD_2 -delete LITERAL2 RESERVED_WORD_2 -bool LITERAL2 RESERVED_WORD_2 -boolean LITERAL2 BooleanVariables RESERVED_WORD_2 -byte LITERAL2 Byte RESERVED_WORD_2 -char LITERAL2 Char RESERVED_WORD_2 -const LITERAL2 Const RESERVED_WORD_2 -false LITERAL2 Constants LITERAL_BOOLEAN -float LITERAL2 Float RESERVED_WORD_2 -double LITERAL2 RESERVED_WORD_2 -null LITERAL2 RESERVED_WORD_2 -NULL LITERAL2 RESERVED_WORD_2 -int LITERAL2 Int RESERVED_WORD_2 -long LITERAL2 Long RESERVED_WORD_2 -new LITERAL2 RESERVED_WORD_2 -private LITERAL2 RESERVED_WORD_2 -protected LITERAL2 RESERVED_WORD_2 -public LITERAL2 RESERVED_WORD_2 -short LITERAL2 RESERVED_WORD_2 -signed LITERAL2 RESERVED_WORD_2 -static LITERAL2 Static RESERVED_WORD_2 -volatile LITERAL2 Volatile RESERVED_WORD_2 -String LITERAL2 String RESERVED_WORD_2 -string LITERAL2 string RESERVED_WORD_2 -void LITERAL2 Void RESERVED_WORD_2 -true LITERAL2 LITERAL_BOOLEAN -unsigned LITERAL2 RESERVED_WORD_2 -word LITERAL2 RESERVED_WORD_2 -array LITERAL2 Constants RESERVED_WORD_2 -sizeof LITERAL2 Constants RESERVED_WORD_2 -dynamic_cast LITERAL2 Constants RESERVED_WORD_2 -typedef LITERAL2 Constants RESERVED_WORD_2 -const_cast LITERAL2 Constants RESERVED_WORD_2 -struct LITERAL2 Constants RESERVED_WORD_2 -static_cast LITERAL2 Constants RESERVED_WORD_2 -union LITERAL2 Constants RESERVED_WORD_2 -friend LITERAL2 Constants RESERVED_WORD_2 -extern LITERAL2 Constants RESERVED_WORD_2 -class LITERAL2 Constants RESERVED_WORD_2 -reinterpret_cast LITERAL2 Constants RESERVED_WORD_2 -register LITERAL2 Constants RESERVED_WORD_2 -explicit LITERAL2 Constants RESERVED_WORD_2 -inline LITERAL2 Constants RESERVED_WORD_2 -_Bool LITERAL2 Constants RESERVED_WORD_2 -complex LITERAL2 Constants RESERVED_WORD_2 -_Complex LITERAL2 Constants RESERVED_WORD_2 -_Imaginary LITERAL2 Constants RESERVED_WORD_2 -atomic_bool LITERAL2 Constants RESERVED_WORD_2 -atomic_char LITERAL2 Constants RESERVED_WORD_2 -atomic_schar LITERAL2 Constants RESERVED_WORD_2 -atomic_uchar LITERAL2 Constants RESERVED_WORD_2 -atomic_short LITERAL2 Constants RESERVED_WORD_2 -atomic_ushort LITERAL2 Constants RESERVED_WORD_2 -atomic_int LITERAL2 Constants RESERVED_WORD_2 -atomic_uint LITERAL2 Constants RESERVED_WORD_2 -atomic_long LITERAL2 Constants RESERVED_WORD_2 -atomic_ulong LITERAL2 Constants RESERVED_WORD_2 -atomic_llong LITERAL2 Constants RESERVED_WORD_2 -atomic_ullong LITERAL2 Constants RESERVED_WORD_2 -virtual LITERAL2 Constants RESERVED_WORD_2 -PROGMEM LITERAL2 Constants RESERVED_WORD_2 +char16_t LITERAL1 RESERVED_WORD_2 +char32_t LITERAL1 RESERVED_WORD_2 +operator LITERAL1 RESERVED_WORD_2 +enum LITERAL1 RESERVED_WORD_2 +delete LITERAL1 RESERVED_WORD_2 +bool LITERAL1 RESERVED_WORD_2 +boolean LITERAL1 BooleanVariables RESERVED_WORD_2 +byte LITERAL1 Byte RESERVED_WORD_2 +char LITERAL1 Char RESERVED_WORD_2 +const LITERAL1 Const RESERVED_WORD_2 +false LITERAL1 Constants LITERAL_BOOLEAN +float LITERAL1 Float RESERVED_WORD_2 +double LITERAL1 RESERVED_WORD_2 +null LITERAL1 RESERVED_WORD_2 +NULL LITERAL1 RESERVED_WORD_2 +int LITERAL1 Int RESERVED_WORD_2 +long LITERAL1 Long RESERVED_WORD_2 +new LITERAL1 RESERVED_WORD_2 +private LITERAL1 RESERVED_WORD_2 +protected LITERAL1 RESERVED_WORD_2 +public LITERAL1 RESERVED_WORD_2 +short LITERAL1 RESERVED_WORD_2 +signed LITERAL1 RESERVED_WORD_2 +static LITERAL1 Static RESERVED_WORD_2 +volatile LITERAL1 Volatile RESERVED_WORD_2 +String LITERAL1 String RESERVED_WORD_2 +string LITERAL1 string RESERVED_WORD_2 +void LITERAL1 Void RESERVED_WORD_2 +true LITERAL1 LITERAL_BOOLEAN +unsigned LITERAL1 RESERVED_WORD_2 +word LITERAL1 RESERVED_WORD_2 +array LITERAL1 Constants RESERVED_WORD_2 +sizeof LITERAL1 Constants RESERVED_WORD_2 +dynamic_cast LITERAL1 Constants RESERVED_WORD_2 +typedef LITERAL1 Constants RESERVED_WORD_2 +const_cast LITERAL1 Constants RESERVED_WORD_2 +struct LITERAL1 Constants RESERVED_WORD_2 +static_cast LITERAL1 Constants RESERVED_WORD_2 +union LITERAL1 Constants RESERVED_WORD_2 +friend LITERAL1 Constants RESERVED_WORD_2 +extern LITERAL1 Constants RESERVED_WORD_2 +class LITERAL1 Constants RESERVED_WORD_2 +reinterpret_cast LITERAL1 Constants RESERVED_WORD_2 +register LITERAL1 Constants RESERVED_WORD_2 +explicit LITERAL1 Constants RESERVED_WORD_2 +inline LITERAL1 Constants RESERVED_WORD_2 +_Bool LITERAL1 Constants RESERVED_WORD_2 +complex LITERAL1 Constants RESERVED_WORD_2 +_Complex LITERAL1 Constants RESERVED_WORD_2 +_Imaginary LITERAL1 Constants RESERVED_WORD_2 +atomic_bool LITERAL1 Constants RESERVED_WORD_2 +atomic_char LITERAL1 Constants RESERVED_WORD_2 +atomic_schar LITERAL1 Constants RESERVED_WORD_2 +atomic_uchar LITERAL1 Constants RESERVED_WORD_2 +atomic_short LITERAL1 Constants RESERVED_WORD_2 +atomic_ushort LITERAL1 Constants RESERVED_WORD_2 +atomic_int LITERAL1 Constants RESERVED_WORD_2 +atomic_uint LITERAL1 Constants RESERVED_WORD_2 +atomic_long LITERAL1 Constants RESERVED_WORD_2 +atomic_ulong LITERAL1 Constants RESERVED_WORD_2 +atomic_llong LITERAL1 Constants RESERVED_WORD_2 +atomic_ullong LITERAL1 Constants RESERVED_WORD_2 +virtual LITERAL1 Constants RESERVED_WORD_2 +PROGMEM LITERAL1 Constants RESERVED_WORD_2 # KEYWORD2 specifies methods and functions