Exemple #1
0
 public void Indent(LuaIndentState indentState, Dictionary <SourceLocation, LuaTokenInfo> tokenMap)
 {
     // no indent needed
     tokenMap[Location] = new LuaTokenInfo {
         Token = TreeNode.ChildNodes[0].Token, IsUnOp = true
     };
 }
Exemple #2
0
 public void Indent(LuaIndentState indentState, Dictionary <SourceLocation, LuaTokenInfo> tokenMap)
 {
     {
         var startLocation = indentState.GetFirstLine(Block);
         var endLocation   = indentState.GetLastLine(Block);
         indentState.Indent(startLocation, endLocation, this);
     }
 }
Exemple #3
0
 public void Indent(LuaIndentState indentState, Dictionary <SourceLocation, LuaTokenInfo> tokenMap)
 {
     if (Arguments != null && Arguments.ChildNodes.Count > 0)
     {
         var startLocation = indentState.GetFirstLine(Arguments.ChildNodes[0]);
         var endLocation   = indentState.GetLastLine(Arguments.ChildNodes[Arguments.ChildNodes.Count - 1]);
         indentState.Indent(startLocation, endLocation, this);
     }
 }
Exemple #4
0
 public void Indent(LuaIndentState indentState, Dictionary <SourceLocation, LuaTokenInfo> tokenMap)
 {
     if (ChildNodes.Count > 0)
     {
         var startLocation = indentState.GetFirstLine(ChildNodes[0]);
         var endLocation   = indentState.GetLastLine(ChildNodes[ChildNodes.Count - 1]);
         indentState.Indent(startLocation, endLocation, Parent);
     }
 }
Exemple #5
0
        public void Indent(LuaIndentState indentState, Dictionary <SourceLocation, LuaTokenInfo> tokenMap)
        {
            {
                var startLocation = indentState.GetFirstLine(Conditions);
                var endLocation   = indentState.GetLastLine(Conditions);
                indentState.Indent(startLocation, endLocation, this);
            }

            {
                var startLocation = indentState.GetFirstLine(IfTrue);
                var endLocation   = indentState.GetLastLine(IfTrue);
                indentState.Indent(startLocation, endLocation, this);
            }

            if (IfFalse != null)
            {
                var startLocation = indentState.GetFirstLine(IfFalse);
                var endLocation   = indentState.GetLastLine(IfFalse);
                indentState.Indent(startLocation, endLocation, this);
            }
        }
Exemple #6
0
 public void Indent(LuaIndentState indentState, Dictionary <SourceLocation, LuaTokenInfo> tokenMap)
 {
     // no indent needed
 }