/[svn]/linuxsampler/trunk/src/scriptvm/tree.cpp
ViewVC logotype

Diff of /linuxsampler/trunk/src/scriptvm/tree.cpp

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

revision 3056 by schoenebeck, Fri Dec 16 12:57:59 2016 UTC revision 3285 by schoenebeck, Thu Jun 22 10:45:38 2017 UTC
# Line 1  Line 1 
1  /*  /*
2   * Copyright (c) 2014 - 2016 Christian Schoenebeck and Andreas Persson   * Copyright (c) 2014 - 2017 Christian Schoenebeck and Andreas Persson
3   *   *
4   * http://www.linuxsampler.org   * http://www.linuxsampler.org
5   *   *
# Line 463  IntArrayVariable::IntArrayVariable(Parse Line 463  IntArrayVariable::IntArrayVariable(Parse
463      memset(&values[0], 0, size * sizeof(int));      memset(&values[0], 0, size * sizeof(int));
464  }  }
465    
466  IntArrayVariable::IntArrayVariable(ParserContext* ctx, int size, ArgsRef values)  IntArrayVariable::IntArrayVariable(ParserContext* ctx, int size, ArgsRef values, bool _bConst)
467      : Variable(ctx, 0, false)      : Variable(ctx, 0, _bConst)
468  {  {
469      this->values.resize(size);      this->values.resize(size);
470      for (int i = 0; i < values->argsCount(); ++i) {      for (int i = 0; i < values->argsCount(); ++i) {
# Line 724  bool While::evalLoopStartCondition() { Line 724  bool While::evalLoopStartCondition() {
724      return m_condition->evalInt();      return m_condition->evalInt();
725  }  }
726    
727    void SyncBlock::dump(int level) {
728        printIndents(level);
729        printf("sync {\n");
730        m_statements->dump(level+1);
731        printIndents(level);
732        printf("}\n");
733    }
734    
735    Statements* SyncBlock::statements() const {
736        return (m_statements) ? const_cast<Statements*>( &*m_statements ) : NULL;
737    }
738    
739  void Neg::dump(int level) {  void Neg::dump(int level) {
740      printIndents(level);      printIndents(level);
741      printf("Negative Expr\n");      printf("Negative Expr\n");
# Line 965  void ParserContext::addWrn(int firstLine Line 977  void ParserContext::addWrn(int firstLine
977      vIssues.push_back(w);      vIssues.push_back(w);
978  }  }
979    
980    void ParserContext::addPreprocessorComment(int firstLine, int lastLine, int firstColumn, int lastColumn) {
981        CodeBlock block;
982        block.firstLine = firstLine;
983        block.lastLine = lastLine;
984        block.firstColumn = firstColumn;
985        block.lastColumn = lastColumn;
986        vPreprocessorComments.push_back(block);
987    }
988    
989  bool ParserContext::setPreprocessorCondition(const char* name) {  bool ParserContext::setPreprocessorCondition(const char* name) {
990      if (builtinPreprocessorConditions.count(name)) return false;      if (builtinPreprocessorConditions.count(name)) return false;
991      if (userPreprocessorConditions.count(name)) return false;      if (userPreprocessorConditions.count(name)) return false;
# Line 996  std::vector<ParserIssue> ParserContext:: Line 1017  std::vector<ParserIssue> ParserContext::
1017      return vWarnings;      return vWarnings;
1018  }  }
1019    
1020    std::vector<CodeBlock> ParserContext::preprocessorComments() const {
1021        return vPreprocessorComments;
1022    }
1023    
1024  VMEventHandler* ParserContext::eventHandler(uint index) {  VMEventHandler* ParserContext::eventHandler(uint index) {
1025      if (!handlers) return NULL;      if (!handlers) return NULL;
1026      return handlers->eventHandler(index);      return handlers->eventHandler(index);

Legend:
Removed from v.3056  
changed lines
  Added in v.3285

  ViewVC Help
Powered by ViewVC