private void checkConstant(String s, FHIRLexer lexer) throws FHIRLexerException { if (s.startsWith("\'") && s.endsWith("\'")) { int i = 1; while (i < s.length()-1) { char ch = s.charAt(i); if (ch == '\\') { switch (ch) { case 't': case 'r': case 'n': case 'f': case '\'': case '\\': case '/': i++; break; case 'u': if (!Utilities.isHex("0x"+s.substring(i, i+4))) throw lexer.error("Improper unicode escape \\u"+s.substring(i, i+4)); break; default: throw lexer.error("Unknown character escape \\"+ch); } } else i++; } } }
private void checkConstant(String s, FHIRLexer lexer) throws FHIRLexerException { if (s.startsWith("\'") && s.endsWith("\'")) { int i = 1; while (i < s.length()-1) { char ch = s.charAt(i); if (ch == '\\') { switch (ch) { case 't': case 'r': case 'n': case 'f': case '\'': case '\\': case '/': i++; break; case 'u': if (!Utilities.isHex("0x"+s.substring(i, i+4))) throw lexer.error("Improper unicode escape \\u"+s.substring(i, i+4)); break; default: throw lexer.error("Unknown character escape \\"+ch); } } else i++; } } }
private void checkConstant(String s, FHIRLexer lexer) throws FHIRLexerException { if (s.startsWith("\'") && s.endsWith("\'")) { int i = 1; while (i < s.length()-1) { char ch = s.charAt(i); if (ch == '\\') { switch (ch) { case 't': case 'r': case 'n': case 'f': case '\'': case '\\': case '/': i++; break; case 'u': if (!Utilities.isHex("0x"+s.substring(i, i+4))) throw lexer.error("Improper unicode escape \\u"+s.substring(i, i+4)); break; default: throw lexer.error("Unknown character escape \\"+ch); } } else i++; } } }
private void checkConstant(String s, FHIRLexer lexer) throws FHIRLexerException { if (s.startsWith("\'") && s.endsWith("\'")) { int i = 1; while (i < s.length() - 1) { char ch = s.charAt(i); if (ch == '\\') { switch (ch) { case 't': case 'r': case 'n': case 'f': case '\'': case '\\': case '/': i++; break; case 'u': if (!Utilities.isHex("0x" + s.substring(i, i + 4))) throw lexer.error("Improper unicode escape \\u" + s.substring(i, i + 4)); break; default: throw lexer.error("Unknown character escape \\" + ch); } } else i++; } } }
private void checkConstant(String s, FHIRLexer lexer) throws FHIRLexerException { if (s.startsWith("\'") && s.endsWith("\'")) { int i = 1; while (i < s.length()-1) { char ch = s.charAt(i); if (ch == '\\') { switch (ch) { case 't': case 'r': case 'n': case 'f': case '\'': case '\\': case '/': i++; break; case 'u': if (!Utilities.isHex("0x"+s.substring(i, i+4))) throw lexer.error("Improper unicode escape \\u"+s.substring(i, i+4)); break; default: throw lexer.error("Unknown character escape \\"+ch); } } else i++; } } }