Skip to content

Commit

Permalink
Remove IntStack because it became redundant
Browse files Browse the repository at this point in the history
It's always actualized by `Stack<Int>`
  • Loading branch information
KvanTTT authored and berezhkoE committed May 24, 2024
1 parent 4708f3d commit 6a5eb6c
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import org.intellij.markdown.flavours.gfm.GFMTokenTypes
import org.intellij.markdown.html.*
import org.intellij.markdown.lexer.Compat
import org.intellij.markdown.lexer.GeneratedLexer
import org.intellij.markdown.lexer.Stack

/* Auto generated File */
class _GFMLexer : GeneratedLexer {
Expand Down Expand Up @@ -56,7 +57,7 @@ class _GFMLexer : GeneratedLexer {
/* user code: */
private class Token : MarkdownTokenTypes()

private val stateStack: IntStack = IntStack()
private val stateStack: Stack<Int> = Stack()
private var isHeader = false
private var codeSpanBacktickslength = 0
private val parseDelimited = ParseDelimited()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import org.intellij.markdown.IElementType
import kotlin.Throws
import org.intellij.markdown.flavours.gfm.GFMTokenTypes
import org.intellij.markdown.html.BitSet
import org.intellij.markdown.html.IntStack
import org.intellij.markdown.lexer.Compat
import org.intellij.markdown.lexer.Stack

/**
* This class is a scanner generated by
Expand Down Expand Up @@ -61,7 +61,7 @@ class _SFMLexer : GeneratedLexer {
/* user code: */
private class Token : MarkdownTokenTypes()

private val stateStack = IntStack()
private val stateStack = Stack<Int>()
private var isHeader = false
private val parseDelimited = ParseDelimited()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,6 @@ expect class BitSet(size: Int){
inline fun BitSet.clear(index: Int) =
set(index, false)

expect class IntStack() {
fun push(e: Int)
fun pop(): Int
fun isEmpty(): Boolean
}

expect fun isWhitespace(char: Char): Boolean

expect fun isPunctuation(char: Char): Boolean
Expand Down
3 changes: 0 additions & 3 deletions src/jsMain/kotlin/CommonDefsImplJs.kt
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
package org.intellij.markdown.html

import org.intellij.markdown.lexer.Stack
import org.w3c.dom.url.URL

actual class IntStack: Stack<Int>()

actual typealias BitSet = BooleanArray

actual class URI actual constructor(str: String) {
Expand Down
2 changes: 0 additions & 2 deletions src/jvmMain/kotlin/CommonDefsImplJvm.kt
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ actual class BitSet actual constructor(size: Int): java.util.BitSet(size){
actual val size = size()
}

actual class IntStack: Stack<Int>()

private const val PUNCTUATION_MASK: Int = (1 shl Character.DASH_PUNCTUATION.toInt()) or
(1 shl Character.START_PUNCTUATION.toInt()) or
(1 shl Character.END_PUNCTUATION.toInt()) or
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
package org.intellij.markdown.html
import org.intellij.markdown.lexer.Stack

actual class IntStack: Stack<Int>()

actual typealias BitSet = BooleanArray

Expand Down
3 changes: 0 additions & 3 deletions src/wasmJsMain/kotlin/CommonDefsImplJs.kt
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
package org.intellij.markdown.html

import org.intellij.markdown.lexer.Stack
import org.w3c.dom.url.URL

actual class IntStack: Stack<Int>()

actual typealias BitSet = BooleanArray

actual class URI actual constructor(str: String) {
Expand Down

0 comments on commit 6a5eb6c

Please sign in to comment.