Skip to content

Commit

Permalink
Updated String's definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
sampersand committed Nov 24, 2023
1 parent 47a57ff commit c38ac95
Show file tree
Hide file tree
Showing 7 changed files with 2,253 additions and 216 deletions.
1 change: 1 addition & 0 deletions core/match_data.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
# See also "Special global variables" section in Regexp documentation.
#
class MatchData
type capture = String | Symbol | int
public

# <!-- rdoc-file=re.c -->
Expand Down
101 changes: 101 additions & 0 deletions core/ops.rbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
module Ops
interface _Add[Rhs, Ouptut]
def +: (Rhs other) -> Output
end

interface _Sub[Rhs, Ouptut]
def -: (Rhs other) -> Output
end

interface _Mul[Rhs, Ouptut]
def *: (Rhs other) -> Output
end

interface _Div[Rhs, Ouptut]
def /: (Rhs other) -> Output
end

interface _Mod[Rhs, Ouptut]
def %: (Rhs other) -> Output
end

interface _Pow[Rhs, Ouptut]
def **: (Rhs other) -> Output
end

interface _Equal[Rhs, Ouptut]
def ==: (Rhs other) -> Output
end

interface _NotEqual[Rhs, Ouptut]
def !=: (Rhs other) -> Output
end

interface _Match[Rhs, Output]
def =~: (Rhs rhs) -> Output
end

interface _NotMatch[Rhs, Output]
def !~: (Rhs rhs) -> Output
end

interface _CaseEqual[Rhs, Output]
def ===: (Rhs rhs) -> Output
end

interface _LessThan[Rhs, Ouptut]
def <: (Rhs other) -> Output
end

interface _GreaterThan[Rhs, Ouptut]
def >: (Rhs other) -> Output
end

interface _LessEqual[Rhs, Ouptut]
def <=: (Rhs other) -> Output
end

interface _GreaterEqual[Rhs, Ouptut]
def >=: (Rhs other) -> Output
end

interface _Spaceship[Rhs, Output]
def <=>: (Rhs other) -> Output
end

interface _LeftShift[Rhs, Ouptut]
def <<: (Rhs other) -> Output
end

interface _RightShift[Rhs, Ouptut]
def <<: (Rhs other) -> Output
end

interface _BitAnd[Rhs, Ouptut]
def &: (Rhs other) -> Output
end

interface _BitOR[Rhs, Ouptut]
def |: (Rhs other) -> Output
end

interface _BitXor[Rhs, Ouptut]
def ^: (Rhs other) -> Output
end

interface _BitNot[Ouptut]
def ~: () -> Output
end

interface _LogicalNot[Ouptut]
def !: () -> Output
end

interface _Negate[Ouptut]
def -@: () -> Output
end

interface _UnaryPlus[Ouptut]
def +@: () -> Output
end
end
Loading

0 comments on commit c38ac95

Please sign in to comment.