Package ideah.lexer

Examples of ideah.lexer.LexedIdentifier


    @Override
    protected void doAction() {
        LOG.assertTrue(myPsiElement.isValid());
        final String newName = getNewName();
        String oldName = myPsiElement.getText();
        LexedIdentifier newId = LexedIdentifier.parseMaybeInfixPrefix(newName);
        LexedIdentifier oldId = LexedIdentifier.parseMaybeInfixPrefix(oldName);
        LOG.assertTrue(newId != null && oldId != null);
        HaskellTokenType newType = newId.type;
        HaskellTokenType oldType = oldId.type;
        String createdName = newName;
        boolean newNameOperator = HaskellTokenTypes.OPERATORS.contains(newType);
View Full Code Here


    public boolean isKeyword(String name, Project project) {
        return HaskellLexer.getKeywords().contains(name);
    }

    public boolean isIdentifier(String name, Project project) {
        LexedIdentifier identifier = LexedIdentifier.parse(name);
        if (identifier == null)
            return false;
        return HaskellTokenTypes.IDS.contains(identifier.type) && !isKeyword(name, project);
    }
View Full Code Here

        return this;
    }

    @Nullable
    public PsiElement setName(@NotNull @NonNls String name) throws IncorrectOperationException {
        LexedIdentifier parsedNewName = LexedIdentifier.parse(name);
        LexedIdentifier parsedOldName = LexedIdentifier.parseMaybeInfixPrefix(getText());
        LOG.assertTrue(!(parsedNewName == null || parsedOldName == null));
        boolean newNameOperator = HaskellTokenTypes.OPERATORS.contains(parsedNewName.type);
        String createdNewName;

        String module = parsedOldName.module;
View Full Code Here

TOP

Related Classes of ideah.lexer.LexedIdentifier

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.