فهرست منبع

Remove hex, octal and binary numbers - apex doesn't support them

olane 7 سال پیش
والد
کامیت
1d66cf8412
2فایلهای تغییر یافته به همراه0 افزوده شده و 68 حذف شده
  1. 0 65
      src/apex/apex.test.ts
  2. 0 3
      src/apex/apex.ts

+ 0 - 65
src/apex/apex.test.ts

@@ -274,55 +274,6 @@ testTokenization('apex', [
 		]
 	}],
 
-	[{
-		line: '0x123',
-		tokens: [
-			{ startIndex: 0, type: 'number.hex.apex' }
-		]
-	}],
-
-	[{
-		line: '0x5_2',
-		tokens: [
-			{ startIndex: 0, type: 'number.hex.apex' }
-		]
-	}],
-
-	[{
-		line: '023L',
-		tokens: [
-			{ startIndex: 0, type: 'number.octal.apex' }
-		]
-	}],
-
-	[{
-		line: '0123l',
-		tokens: [
-			{ startIndex: 0, type: 'number.octal.apex' }
-		]
-	}],
-
-	[{
-		line: '05_2',
-		tokens: [
-			{ startIndex: 0, type: 'number.octal.apex' }
-		]
-	}],
-
-	[{
-		line: '0b1010_0101',
-		tokens: [
-			{ startIndex: 0, type: 'number.binary.apex' }
-		]
-	}],
-
-	[{
-		line: '0B001',
-		tokens: [
-			{ startIndex: 0, type: 'number.binary.apex' }
-		]
-	}],
-
 	[{
 		line: '10e3',
 		tokens: [
@@ -528,22 +479,6 @@ testTokenization('apex', [
 		]
 	}],
 
-	[{
-		line: '0x52_',
-		tokens: [
-			{ startIndex: 0, type: 'number.hex.apex' },
-			{ startIndex: 4, type: 'identifier.apex' }
-		]
-	}],
-
-	[{
-		line: '052_',
-		tokens: [
-			{ startIndex: 0, type: 'number.octal.apex' },
-			{ startIndex: 3, type: 'identifier.apex' }
-		]
-	}],
-
 	[{
 		line: '23.5L',
 		tokens: [

+ 0 - 3
src/apex/apex.ts

@@ -245,9 +245,6 @@ export const language = <ILanguage>{
 			// numbers
 			[/(@digits)[eE]([\-+]?(@digits))?[fFdD]?/, 'number.float'],
 			[/(@digits)\.(@digits)([eE][\-+]?(@digits))?[fFdD]?/, 'number.float'],
-			[/0[xX](@hexdigits)[Ll]?/, 'number.hex'],
-			[/0(@octaldigits)[Ll]?/, 'number.octal'],
-			[/0[bB](@binarydigits)[Ll]?/, 'number.binary'],
 			[/(@digits)[fFdD]/, 'number.float'],
 			[/(@digits)[lL]?/, 'number'],