コード例 #1
0
ファイル: FormatContext.cs プロジェクト: hbqzq/luafmt
        public void ResetIndent()
        {
            var scope = IndentScope.Get();

            scope.Enter(0, 0);
            scopes.Push(scope);
        }
コード例 #2
0
ファイル: FormatContext.cs プロジェクト: hbqzq/luafmt
 public void PopIndent(IndentScope scope)
 {
     if (scopes.Peek() == scope)
     {
         PopIndent();
     }
 }
コード例 #3
0
ファイル: FormatContext.cs プロジェクト: hbqzq/luafmt
        public void PushIndent(int delay = 0)
        {
            var scope = IndentScope.Get();

            scope.Enter(realIndentLevel + 1, delay);
            scopes.Push(scope);
        }
コード例 #4
0
ファイル: FormatContext.cs プロジェクト: hbqzq/luafmt
 public void PopIndent()
 {
     if (scopes.Count > 0)
     {
         IndentScope.Release(scopes.Pop());
     }
 }
コード例 #5
0
ファイル: IndentScope.cs プロジェクト: hbqzq/luafmt
 public static void Release(IndentScope scope)
 {
     pool.Push(scope);
 }