coding style
This commit is contained in:
parent
543b4dfe17
commit
3a94cb3e23
3 changed files with 8 additions and 8 deletions
|
|
@ -1,3 +1,3 @@
|
|||
#include "AST.h"
|
||||
|
||||
Location Location::NONE(0, 0, 0, 0,"");
|
||||
Location Location::NONE(0, 0, 0, 0, "");
|
||||
|
|
|
|||
10
src/AST.h
10
src/AST.h
|
|
@ -1,17 +1,17 @@
|
|||
#pragma once
|
||||
#include<string>
|
||||
#include <string>
|
||||
|
||||
class Location {
|
||||
public:
|
||||
Location(int firstLine, int firstCol, int lastLine, int lastCol,std::string filename)
|
||||
: first_line(firstLine), first_col(firstCol), last_line(lastLine), last_col(lastCol),file_name(filename) {
|
||||
Location(int firstLine, int firstCol, int lastLine, int lastCol, const std::string &filename)
|
||||
: first_line(firstLine), first_col(firstCol), last_line(lastLine), last_col(lastCol), filename(filename) {
|
||||
}
|
||||
|
||||
int firstLine() const { return first_line; }
|
||||
int firstColumn() const { return first_col; }
|
||||
int lastLine() const { return last_line; }
|
||||
int lastColumn() const { return last_col; }
|
||||
std::string fileName() const {return file_name; }
|
||||
std::string fileName() const {return filename; }
|
||||
|
||||
static Location NONE;
|
||||
private:
|
||||
|
|
@ -19,7 +19,7 @@ private:
|
|||
int first_col;
|
||||
int last_line;
|
||||
int last_col;
|
||||
std::string file_name;
|
||||
std::string filename;
|
||||
};
|
||||
|
||||
class ASTNode
|
||||
|
|
|
|||
|
|
@ -267,8 +267,8 @@ void CommentParser::collectParameters(const char *fulltext, FileModule *root_mod
|
|||
|
||||
// get location of assignment node
|
||||
int firstLine = assignment.location().firstLine();
|
||||
if(firstLine>=parseTill || assignment.location().fileName()!=root_module->modulePath()){
|
||||
continue;
|
||||
if (firstLine>=parseTill || assignment.location().fileName() != root_module->modulePath()) {
|
||||
continue;
|
||||
}
|
||||
// making list to add annotations
|
||||
AnnotationList *annotationList = new AnnotationList();
|
||||
|
|
|
|||
Loading…
Reference in a new issue