Set the correct numeric constant state
| 112 | |
| 113 | // Set the correct numeric constant state |
| 114 | inline bool SetNumericConstantState(StyleContext &scDoc) { |
| 115 | |
| 116 | int iPoints = 0; // Point counter |
| 117 | char cNumericString[512]; // Numeric string buffer |
| 118 | |
| 119 | // Buffer the current numberic string |
| 120 | scDoc.GetCurrent(cNumericString, sizeof(cNumericString)); |
| 121 | // Loop through the string until end of string (NULL termination) |
| 122 | for (int iIndex = 0; cNumericString[iIndex] != '\0'; iIndex++) { |
| 123 | // Depending on the character |
| 124 | switch (cNumericString[iIndex]) { |
| 125 | // Is a . (point) |
| 126 | case '.' : |
| 127 | // Increment point counter |
| 128 | iPoints++; |
| 129 | break; |
| 130 | default : |
| 131 | break; |
| 132 | } |
| 133 | } |
| 134 | // If points found (can be more than one for improper formatted number |
| 135 | if (iPoints > 0) { |
| 136 | return(true); |
| 137 | } |
| 138 | // Else no points found |
| 139 | else { |
| 140 | return(false); |
| 141 | } |
| 142 | } |
| 143 | |
| 144 | // Get the next word in uppercase from the current position (keyword lookahead) |
| 145 | inline bool GetNextWordUpper(Accessor &styler, unsigned int uiStartPos, int iLength, char *cWord) { |
no test coverage detected