Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 93c1a05d991f74f155ee381ad0b68a3fba26c837 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package org.eclipse.cdt.internal.ui.text;

import org.eclipse.jface.text.rules.IToken;

/**
 * Rule to recognize operators.
 *
 * @author P.Tomaszewski
 */
public class COperatorRule extends SingleCharRule
{
    /**
     * Creates new rule.
     * @param token Style token.
     */
    public COperatorRule(IToken token)
    {
        super(token);
    }

    /**
     * @see org.eclipse.cdt.internal.ui.text.SingleCharRule#isRuleChar(int)
     */
    public boolean isRuleChar(int ch)
    {
        return (ch == ';' || ch == '.' || ch == ':' || ch == '=' || ch == '-'
            || ch == '+' || ch == '\\' || ch == '*' || ch == '!' || ch == '%'
            || ch == '^' || ch == '&' || ch == '~' || ch == '>' || ch == '<')
            || ch == '|';
    }
}

Back to the top