/[svn]/linuxsampler/trunk/src/scriptvm/common.h
ViewVC logotype

Diff of /linuxsampler/trunk/src/scriptvm/common.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2888 by schoenebeck, Sun Apr 24 18:16:10 2016 UTC revision 2889 by schoenebeck, Mon Apr 25 17:28:23 2016 UTC
# Line 667  namespace LinuxSampler { Line 667  namespace LinuxSampler {
667       */       */
668      struct ParserIssue {      struct ParserIssue {
669          String txt; ///< Human readable explanation text of the parser issue.          String txt; ///< Human readable explanation text of the parser issue.
670          int line; ///< Line number within the script where this issue was encountered.          int firstLine; ///< The first line number within the script where this issue was encountered (indexed with 1 being the very first line).
671          int column; ///< Column within the script where this issue was encountered.          int lastLine; ///< The last line number within the script where this issue was encountered.
672            int firstColumn; ///< The first column within the script where this issue was encountered (indexed with 1 being the very first column).
673            int lastColumn; ///< The last column within the script where this issue was encountered.
674          ParserIssueType_t type; ///< Whether this issue is either a parser error or just a parser warning.          ParserIssueType_t type; ///< Whether this issue is either a parser error or just a parser warning.
675    
676          /**          /**
# Line 677  namespace LinuxSampler { Line 679  namespace LinuxSampler {
679          inline void dump() {          inline void dump() {
680              switch (type) {              switch (type) {
681                  case PARSER_ERROR:                  case PARSER_ERROR:
682                      printf("[ERROR] line %d, column %d: %s\n", line, column, txt.c_str());                      printf("[ERROR] line %d, column %d: %s\n", firstLine, firstColumn, txt.c_str());
683                      break;                      break;
684                  case PARSER_WARNING:                  case PARSER_WARNING:
685                      printf("[Warning] line %d, column %d: %s\n", line, column, txt.c_str());                      printf("[Warning] line %d, column %d: %s\n", firstLine, firstColumn, txt.c_str());
686                      break;                      break;
687              }              }
688          }          }
# Line 792  namespace LinuxSampler { Line 794  namespace LinuxSampler {
794          String text() const;          String text() const;
795    
796          // position of token in script          // position of token in script
797          int firstLine() const;          int firstLine() const; ///< First line this source token is located at in script source code (indexed with 0 being the very first line).
798          int firstColumn() const;          int firstColumn() const; ///< Last line this source token is located at in script source code.
799    
800          // base types          // base types
801          bool isEOF() const;          bool isEOF() const;

Legend:
Removed from v.2888  
changed lines
  Added in v.2889

  ViewVC Help
Powered by ViewVC