/** * Converts the current lexical unit to a float. */ protected float number(boolean positive) { try { float sgn = (positive) ? 1 : -1; String val = scanner.getStringValue(); nextIgnoreSpaces(); return sgn * Float.parseFloat(val); } catch (NumberFormatException e) { throw createCSSParseException("number.format"); } }
/** * Converts the current lexical unit to a float. */ protected float number(boolean positive) { try { float sgn = (positive) ? 1 : -1; String val = scanner.getStringValue(); nextIgnoreSpaces(); return sgn * Float.parseFloat(val); } catch (NumberFormatException e) { throw createCSSParseException("number.format"); } }
/** * Converts the current lexical unit to a float. */ protected float number(boolean positive) { try { float sgn = (positive) ? 1 : -1; String val = scanner.getStringValue(); nextIgnoreSpaces(); return sgn * Float.parseFloat(val); } catch (NumberFormatException e) { throw createCSSParseException("number.format"); } }
/** * Parses a rule using the current scanner. */ protected void parseRuleInternal() throws CSSException, IOException { nextIgnoreSpaces(); parseRule(); scanner.close(); scanner = null; }
/** * Parses selectors using the current scanner. */ protected SelectorList parseSelectorsInternal() throws CSSException, IOException { nextIgnoreSpaces(); SelectorList ret = parseSelectorList(); scanner.close(); scanner = null; return ret; }
/** * Parses selectors using the current scanner. */ protected SelectorList parseSelectorsInternal() throws CSSException, IOException { nextIgnoreSpaces(); SelectorList ret = parseSelectorList(); scanner.close(); scanner = null; return ret; }
/** * Parses a rule using the current scanner. */ protected void parseRuleInternal() throws CSSException, IOException { nextIgnoreSpaces(); parseRule(); scanner.close(); scanner = null; }
/** * Parses a rule using the current scanner. */ protected void parseRuleInternal() throws CSSException, IOException { nextIgnoreSpaces(); parseRule(); scanner.close(); scanner = null; }
/** * Parses selectors using the current scanner. */ protected SelectorList parseSelectorsInternal() throws CSSException, IOException { nextIgnoreSpaces(); SelectorList ret = parseSelectorList(); scanner.close(); scanner = null; return ret; }
/** * Parses the priority using the current scanner. */ protected boolean parsePriorityInternal() throws CSSException, IOException { nextIgnoreSpaces(); scanner.close(); scanner = null; switch (current) { case LexicalUnits.EOF: return false; case LexicalUnits.IMPORT_SYMBOL: return true; default: reportError("token", new Object[] { new Integer(current) }); return false; } }
/** * Parses the priority using the current scanner. */ protected boolean parsePriorityInternal() throws CSSException, IOException { nextIgnoreSpaces(); scanner.close(); scanner = null; switch (current) { case LexicalUnits.EOF: return false; case LexicalUnits.IMPORT_SYMBOL: return true; default: reportError("token", new Object[] {current}); return false; } }
/** * Parses an unknown rule. */ protected void parseAtRule() { scanner.scanAtRule(); documentHandler.ignorableAtRule(scanner.getStringValue()); nextIgnoreSpaces(); }
/** * Parses an unknown rule. */ protected void parseAtRule() { scanner.scanAtRule(); documentHandler.ignorableAtRule(scanner.getStringValue()); nextIgnoreSpaces(); }
/** * Parses an unknown rule. */ protected void parseAtRule() { scanner.scanAtRule(); documentHandler.ignorableAtRule(scanner.getStringValue()); nextIgnoreSpaces(); }
/** * Parses a style declaration using the current scanner. */ protected void parseStyleDeclarationInternal() throws CSSException, IOException { nextIgnoreSpaces(); try { parseStyleDeclaration(false); } catch (CSSParseException e) { reportError(e); } finally { scanner.close(); scanner = null; } }
/** * Parses a style declaration using the current scanner. */ protected void parseStyleDeclarationInternal() throws CSSException, IOException { nextIgnoreSpaces(); try { parseStyleDeclaration(false); } catch (CSSParseException e) { reportError(e); } finally { scanner.close(); scanner = null; } }
/** * Parses a style declaration using the current scanner. */ protected void parseStyleDeclarationInternal() throws CSSException, IOException { nextIgnoreSpaces(); try { parseStyleDeclaration(false); } catch (CSSParseException e) { reportError(e); } finally { scanner.close(); scanner = null; } }
/** * Parses a selector list */ protected SelectorList parseSelectorList() { CSSSelectorList result = new CSSSelectorList(); result.append(parseSelector()); for (;;) { if (current != LexicalUnits.COMMA) { return result; } nextIgnoreSpaces(); result.append(parseSelector()); } }
/** * Parses a selector list */ protected SelectorList parseSelectorList() { CSSSelectorList result = new CSSSelectorList(); result.append(parseSelector()); for (;;) { if (current != LexicalUnits.COMMA) { return result; } nextIgnoreSpaces(); result.append(parseSelector()); } }
/** * Parses a selector list */ protected SelectorList parseSelectorList() { CSSSelectorList result = new CSSSelectorList(); result.append(parseSelector()); for (;;) { if (current != LexicalUnits.COMMA) { return result; } nextIgnoreSpaces(); result.append(parseSelector()); } }