parser/rule.vala \
parser/scanner.vala \
parser/sequencerule.vala \
- parser/sourcelocation.vala \
parser/stubrule.vala \
parser/token.vala \
parser/tokentype.vala \
}
}
- private SourceLocation get_begin () {
- return SourceLocation (_last_line, get_line_start_column () + _last_column);
+ private Vala.SourceLocation get_begin () {
+ return Vala.SourceLocation (_index, _last_line, get_line_start_column () + _last_column);
}
- private SourceLocation get_end (int offset = 0) {
- return SourceLocation (_line, get_line_start_column () + _column + offset);
+ private Vala.SourceLocation get_end (int offset = 0) {
+ return Vala.SourceLocation (_index, _line, get_line_start_column () + _column + offset);
}
public int get_line_start_column () {
return 0;
}
- private SourceLocation get_begin () {
- return SourceLocation (_last_line, get_line_start_column () + _last_column);
+ private Vala.SourceLocation get_begin () {
+ return Vala.SourceLocation (_index, _last_line, get_line_start_column () + _last_column);
}
- private SourceLocation get_end (int offset = 0) {
- return SourceLocation (_line, get_line_start_column () + _column + offset);
+ private Vala.SourceLocation get_end (int offset = 0) {
+ return Vala.SourceLocation (_index, _line, get_line_start_column () + _column + offset);
}
private void emit_current_word () throws ParserError {
private string _filename;
private string _cname;
private StringBuilder _comment;
- private SourceLocation _comment_location;
+ private Vala.SourceLocation _comment_location;
protected Content.ContentFactory factory;
}
private void add_documentation (string _symbol_name, StringBuilder? comment, string filename,
- SourceLocation src_ref)
+ Vala.SourceLocation src_ref)
{
Api.Node? symbol = null;
return 0;
}
- private SourceLocation get_begin () {
- return SourceLocation (_last_line, get_line_start_column () + _last_column);
+ private Vala.SourceLocation get_begin () {
+ return Vala.SourceLocation (_index, _last_line, get_line_start_column () + _last_column);
}
- private SourceLocation get_end (int offset = 0) {
- return SourceLocation (_line, get_line_start_column () + _column + offset);
+ private Vala.SourceLocation get_end (int offset = 0) {
+ return Vala.SourceLocation (_index, _line, get_line_start_column () + _column + offset);
}
private void emit_current_word () throws ParserError {
+++ /dev/null
-/* sourcelocation.vala
- *
- * Copyright (C) 2008 Jürg Billeter
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Author:
- * Jürg Billeter <j@bitron.ch>
- */
-
-
-/**
- * Represents a position in a source file.
- */
-public struct Valadoc.SourceLocation {
- public int line;
- public int column;
-
- public SourceLocation (int _line, int _column) {
- line = _line;
- column = _column;
- }
-}
public class Valadoc.Token : Object {
- public Token.from_type (TokenType type, SourceLocation begin, SourceLocation end, string? val = null) {
+ public Token.from_type (TokenType type, Vala.SourceLocation begin, Vala.SourceLocation end, string? val = null) {
_type = type;
_begin = begin;
_end = end;
_value = val;
}
- public Token.from_word (string word, SourceLocation begin, SourceLocation end) {
+ public Token.from_word (string word, Vala.SourceLocation begin, Vala.SourceLocation end) {
_word = word;
_begin = begin;
_end = end;
private TokenType? _type = null;
private string? _word = null;
- private SourceLocation _begin;
- private SourceLocation _end;
+ private Vala.SourceLocation _begin;
+ private Vala.SourceLocation _end;
private string? _value;
public bool is_word {
}
}
- public SourceLocation begin {
+ public Vala.SourceLocation begin {
get {
return _begin;
}
}
- public SourceLocation end {
+ public Vala.SourceLocation end {
get {
return _end;
}
}
private void emit_token (Valadoc.TokenType type) throws Valadoc.ParserError {
- Valadoc.SourceLocation loc = SourceLocation (pos, pos);
+ Vala.SourceLocation loc = Vala.SourceLocation (null, pos, pos);
parser.accept_token (new Token.from_type (type, loc, loc));
}