Package org.apache.flex.compiler.common

Examples of org.apache.flex.compiler.common.SourceLocation


    {
        String currentFileName = cfg.findSourcePath(b, instructionIndex);
        int currentLine = cfg.findLineNumber(b, instructionIndex);

        if ( currentFileName != null && currentLine != -1 )
            return new SourceLocation(currentFileName, ISourceLocation.UNKNOWN, ISourceLocation.UNKNOWN, currentLine, ISourceLocation.UNKNOWN);
        else
            return new SourceLocation();
    }
View Full Code Here


     * @param tokenLength Length of the problematic input.
     * @return Current source location used to report a syntax problem.
     */
    protected final ISourceLocation getCurrentSourceLocation(int tokenLength)
    {
        return new SourceLocation(
                getSourcePath(),
                getOffset(),
                getOffset() + tokenLength,
                getLine(),
                getColumn());
View Full Code Here

                    break;
                }
                default:
                {
                    // Add an error if the flag is not valid.
                    ISourceLocation location = new SourceLocation(getSourcePath(),
                            getStart() + i, getStart() + i + 1, getLine(), getColumn());
                    ICompilerProblem problem = new SyntaxProblem(location, Character.toString(charAt));
                    reporter.addProblem(problem);
                    break;
                }
View Full Code Here

            int start = firstFragment.getPhysicalStart();
            int end = lastFragment.getPhysicalStart() + lastFragment.getPhysicalText().length();
            int line = firstFragment.getPhysicalLine();
            int column = firstFragment.getPhysicalColumn();

            return new SourceLocation(sourcePath, start, end, line, column);
        }
View Full Code Here

        }

        value = property.substring(value_start,prop_index);
        value = unescape(value, startOffset+value_start, value_start, lineNumber, property);
       
        SourceLocation keyLocation = new SourceLocation(filePath, startOffset,
                startOffset+key.length(), lineNumber, column);
        SourceLocation valueLocation = new SourceLocation(filePath, startOffset+value_start,
                startOffset+value_start+value.length(), lineNumber, value_start);
       
        process(key, value, keyLocation, valueLocation, problems);

        return key;
View Full Code Here

                                unicode = (unicode << 4) + 10 + add - 'A';
                                break;

                            default:
                            {
                                ISourceLocation location = new SourceLocation(filePath,
                                    start, start + string.length(), line, column);
                                ICompilerProblem problem = new ResourceBundleMalformedEncodingProblem(location, string);
                                problems.add(problem);
                            }
                        }
View Full Code Here

            }

            end = unit.getEnd();
        }

        return new SourceLocation(sourcePath, start, end, line, column);
    }
View Full Code Here

    }

    @Override
    public SourceLocation getValueLocation()
    {
        return new SourceLocation(getSourcePath(), getValueStart(), getValueEnd(), getValueLine(), getValueColumn());
    }
View Full Code Here

        }
    }

    private static ICompilerProblem genericParserProblem(String path, int start, int end, int line, int column)
    {
        ISourceLocation location = new SourceLocation(path, start, end, line, column);
        return new ParserProblem(location);
    }
View Full Code Here

        ISourceFragment[] fragments = info.getSourceFragments();
        String text = SourceFragmentsReader.concatLogicalText(fragments);
        if (!builder.getMXMLDialect().isWhitespace(text))
        {
            ITypeDefinition type = builder.getBuiltinType(IASLanguageConstants.ANY_TYPE);
            SourceLocation location = info.getSourceLocation();
            MXMLClassDefinitionNode classNode =
                    (MXMLClassDefinitionNode)getClassDefinitionNode();

            MXMLInstanceNode instanceNode =
                    builder.createInstanceNode(this, type, fragments, location, FLAGS, classNode);
View Full Code Here

TOP

Related Classes of org.apache.flex.compiler.common.SourceLocation

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.