Overview
Comment: | OFLocale: Add . operator to check for real numbers |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
f5dd9b7f73e67908cb9aa812c0ff8882 |
User & Date: | js on 2020-04-12 15:57:42 |
Other Links: | manifest | tags |
Context
2020-04-12
| ||
22:09 | OFLocale: Switch to infix notation check-in: fe77fef5ec user: js tags: trunk | |
15:57 | OFLocale: Add . operator to check for real numbers check-in: f5dd9b7f73 user: js tags: trunk | |
15:39 | OFLocale: Add a stack machine for plurals check-in: 411b99fea8 user: js tags: trunk | |
Changes
Modified src/OFLocale.m from [c6430c7378] to [279230af16].
︙ | |||
107 108 109 110 111 112 113 | 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 | - + + | TYPE_LESS_EQUAL, TYPE_GREATER, TYPE_GREATER_EQUAL, TYPE_ADD, TYPE_MODULO, TYPE_AND, TYPE_OR, |
︙ | |||
134 135 136 137 138 139 140 141 142 143 144 | 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 | + + - + + - + - - + + | type = TYPE_MODULO; } else if ([atom isEqual: @"&&"]) { type = TYPE_AND; } else if ([atom isEqual: @"||"]) { type = TYPE_OR; } else if ([atom isEqual: @"!"]) { type = TYPE_NOT; } else if ([atom isEqual: @"."]) { type = TYPE_IS_REAL; } else { of_unichar_t firstCharacter = [atom characterAtIndex: 0]; |
︙ | |||
199 200 201 202 203 204 205 | 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 | - - + + | compare: second] == OF_ORDERED_DESCENDING]; break; case TYPE_GREATER_EQUAL: var = [OFNumber numberWithBool: [first compare: second] != OF_ORDERED_ASCENDING]; break; case TYPE_ADD: |
︙ | |||
224 225 226 227 228 229 230 231 | 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 | + + + + + - - + + + + + + + + + + + - + | [stack replaceObjectAtIndex: stackSize - 2 withObject: var]; [stack removeLastObject]; break; case TYPE_NOT: case TYPE_IS_REAL: stackSize = stack.count; first = stack.lastObject; switch (type) { case TYPE_NOT: |
︙ |