コード例 #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
     };
 }
コード例 #2
0
ファイル: LuaDoNode.cs プロジェクト: LFYG/LuaFormat-1
 public void Indent(LuaIndentState indentState, Dictionary <SourceLocation, LuaTokenInfo> tokenMap)
 {
     {
         var startLocation = indentState.GetFirstLine(Block);
         var endLocation   = indentState.GetLastLine(Block);
         indentState.Indent(startLocation, endLocation, this);
     }
 }
コード例 #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);
     }
 }
コード例 #4
0
ファイル: LuaParamListNode.cs プロジェクト: LFYG/LuaFormat-1
 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);
     }
 }
コード例 #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);
            }
        }
コード例 #6
0
ファイル: LuaFieldNode.cs プロジェクト: LFYG/LuaFormat-1
 public void Indent(LuaIndentState indentState, Dictionary <SourceLocation, LuaTokenInfo> tokenMap)
 {
     // no indent needed
 }