Code example for Matcher

Methods: endfindgroupgroupCount

0
        } 
    } 
 
    private Token comment() { 
        Matcher matcher = scanner.getMatcherForPattern("^ *\\/\\/(-)?([^\\n]*)");
        if (matcher.find(0) && matcher.groupCount() > 1) {
            boolean buffer = !"-".equals(matcher.group(1));
            Comment comment = new Comment(matcher.group(2).trim(), lineno, buffer);
            consume(matcher.end());
            return comment;
        } 
        return null; 
    } 
 
    private Token code() { 
        Matcher matcher = scanner.getMatcherForPattern("^(!?=|-)([^\\n]+)");
        if (matcher.find(0) && matcher.groupCount() > 1) {
            Expression code = new Expression(matcher.group(2), lineno);
            String type = matcher.group(1);
            code.setEscape(type.equals("="));
Connect your IDE to all the code out there  Get Codota for Java