Add arrow-lr
ligation group for C-like's spaceship operators (#2041).
This commit is contained in:
parent
aab298f771
commit
c2e0652d7f
3 changed files with 59 additions and 27 deletions
|
@ -1,3 +1,4 @@
|
|||
* Refine shape of flat `5` (#2030).
|
||||
* Fix `ss02`, `ss04`, `ss06`, `ss13`, `ss17`'s application on `i` and `j` (#2033).
|
||||
* Add tailed lower lambda (#2036).
|
||||
* Add `arrow-lr` ligation group for C-like's spaceship operators (#2041).
|
||||
|
|
|
@ -471,17 +471,21 @@ define [buildLigationsImpl gsub para $LigGroup$] : begin
|
|||
define [CAntiHeadForce] : if dbl [lsx 'hole'] [lsx 'shift0.anti']
|
||||
define [CAntiHeadForceShiftN1] : if dbl [lsx 'hole.shiftN1'] [lsx 'shiftN1.anti']
|
||||
|
||||
define [LJoinHeadForce] : if [hasLG 'arrow-l'] [CJoinHeadForce] advance
|
||||
define [LJoinHeadForceShift1] : if [hasLG 'arrow-l'] [CJoinHeadForceShift1] advance
|
||||
define [LMiddleHead] : if [hasLG 'counter-arrow-l'] [CJoinHeadMid] : if [hasLG 'arrow-l'] [LJoinHeadForce] advance
|
||||
define [LAntiHeadForce] : if [hasLG 'counter-arrow-l'] [CAntiHeadForce] advance
|
||||
define [LAntiHeadForceShiftN1] : if [hasLG 'counter-arrow-l'] [CAntiHeadForceShiftN1] advance
|
||||
define [LJoinHeadForce] : if [hasLG 'arrow-l'] [CJoinHeadForce] advance
|
||||
define [LJoinHeadForceLR] : if ([hasLG 'arrow-l'] || [hasLG 'arrow-lr']) [CJoinHeadForce] advance
|
||||
define [LJoinHeadForceShift1] : if [hasLG 'arrow-l'] [CJoinHeadForceShift1] advance
|
||||
define [LJoinHeadForceShift1LR] : if ([hasLG 'arrow-l'] || [hasLG 'arrow-lr']) [CJoinHeadForce] advance
|
||||
define [LMiddleHead] : if [hasLG 'counter-arrow-l'] [CJoinHeadMid] : if [hasLG 'arrow-l'] [LJoinHeadForce] advance
|
||||
define [LAntiHeadForce] : if [hasLG 'counter-arrow-l'] [CAntiHeadForce] advance
|
||||
define [LAntiHeadForceShiftN1] : if [hasLG 'counter-arrow-l'] [CAntiHeadForceShiftN1] advance
|
||||
|
||||
define [RJoinHeadForce] : if [hasLG 'arrow-r'] [CJoinHeadForce] advance
|
||||
define [RJoinHeadForceShift1] : if [hasLG 'arrow-r'] [CJoinHeadForceShift1] advance
|
||||
define [RMiddleHead] : if [hasLG 'counter-arrow-r'] [CJoinHeadMid] : if [hasLG 'arrow-r'] [RJoinHeadForce] advance
|
||||
define [RAntiHeadForce] : if [hasLG 'counter-arrow-r'] [CAntiHeadForce] advance
|
||||
define [RAntiHeadForceShiftN1] : if [hasLG 'counter-arrow-r'] [CAntiHeadForceShiftN1] advance
|
||||
define [RJoinHeadForce] : if [hasLG 'arrow-r'] [CJoinHeadForce] advance
|
||||
define [RJoinHeadForceLR] : if ([hasLG 'arrow-r'] || [hasLG 'arrow-lr']) [CJoinHeadForce] advance
|
||||
define [RJoinHeadForceShift1] : if [hasLG 'arrow-r'] [CJoinHeadForceShift1] advance
|
||||
define [RJoinHeadForceShift1LR] : if ([hasLG 'arrow-r'] || [hasLG 'arrow-lr']) [CJoinHeadForce] advance
|
||||
define [RMiddleHead] : if [hasLG 'counter-arrow-r'] [CJoinHeadMid] : if [hasLG 'arrow-r'] [RJoinHeadForce] advance
|
||||
define [RAntiHeadForce] : if [hasLG 'counter-arrow-r'] [CAntiHeadForce] advance
|
||||
define [RAntiHeadForceShiftN1] : if [hasLG 'counter-arrow-r'] [CAntiHeadForceShiftN1] advance
|
||||
|
||||
# Ambiguous
|
||||
define [LAntiHeadAmbig] : if doLTAlt [LAntiHeadForce] advance
|
||||
|
@ -532,6 +536,28 @@ define [buildLigationsImpl gsub para $LigGroup$] : begin
|
|||
less ~> [LMiddleHead]
|
||||
rodCls ~> look-around
|
||||
|
||||
begin "Dual / Spaceship"
|
||||
heads.push : chain-rule # < < = > >
|
||||
less ~> look-around
|
||||
less ~> [LJoinHeadForceShift1LR]
|
||||
rodCls ~> look-around
|
||||
greater ~> [RJoinHeadForceShift1LR]
|
||||
greater ~> look-around
|
||||
heads.push : chain-rule # < < = >
|
||||
less ~> look-around
|
||||
less ~> [LJoinHeadForceShift1LR]
|
||||
rodCls ~> look-around
|
||||
greater ~> [RJoinHeadForceLR]
|
||||
heads.push : chain-rule # < = > >
|
||||
less ~> [LJoinHeadForceLR]
|
||||
rodCls ~> look-around
|
||||
greater ~> [RJoinHeadForceShift1LR]
|
||||
greater ~> look-around
|
||||
heads.push : chain-rule # < = >
|
||||
less ~> [LJoinHeadForceLR]
|
||||
rodCls ~> look-around
|
||||
greater ~> [RJoinHeadForceLR]
|
||||
|
||||
begin "Boundary"
|
||||
heads.push : chain-rule # = > >
|
||||
rodCls ~> look-around
|
||||
|
|
|
@ -65,6 +65,11 @@ ligGroup = "arrow-r"
|
|||
samples = ["->", "->>", "-->", "--->", "<->", "<-->", "<--->", "<---->", "=>", "=>>", "==>", "===>", "<=>", "<==>", "<===>", "<====>", "<~>", "~>", "~~>", "-------->", ">=>", ">->"]
|
||||
desc = 'Enable ligation set that forms right-pointing arrows'
|
||||
|
||||
[simple.arrow-lr]
|
||||
ligGroup = "arrow-lr"
|
||||
samples = ["<->", "<=>", "<~>"]
|
||||
desc = 'Enable ligation set that forms dual-pointing arrows'
|
||||
|
||||
[simple.counter-arrow-l]
|
||||
ligGroup = "counter-arrow-l"
|
||||
samples = ["-<<", "-<", "-<-", "=<<", "=<", "=<=", "<=<", "-<<", "-<", "-<-", "=<<", "=<", "=<="]
|
||||
|
@ -339,7 +344,7 @@ buildup = [
|
|||
'--default-center-ops--',
|
||||
'--default-equality-inequality--',
|
||||
'--default-kern--',
|
||||
'arrow-l', 'arrow-r',
|
||||
'arrow-l', 'arrow-r', 'arrow-lr',
|
||||
'html-comment',
|
||||
'ltgt-diamond-tag',
|
||||
'ltgt-slash-tag',
|
||||
|
@ -360,7 +365,7 @@ buildup = [
|
|||
'center-op-influence-dot',
|
||||
'--default-equality-inequality--',
|
||||
'--default-kern--',
|
||||
'arrow-l', 'arrow-r',
|
||||
'arrow-l', 'arrow-r', 'arrow-lr',
|
||||
'counter-arrow-l', 'counter-arrow-r',
|
||||
'html-comment',
|
||||
'ltgt-diamond-tag',
|
||||
|
@ -386,7 +391,7 @@ buildup = [
|
|||
'--c-center-ops--',
|
||||
'--c-equality-inequality--',
|
||||
'--default-kern--',
|
||||
'arrow-r',
|
||||
'arrow-r', 'arrow-lr',
|
||||
'ltgt-diamond',
|
||||
'trig',
|
||||
'slash-asterisk',
|
||||
|
@ -403,7 +408,7 @@ buildup = [
|
|||
'--c-center-ops--',
|
||||
'--c-equality-inequality--',
|
||||
'--default-kern--',
|
||||
'arrow-r',
|
||||
'arrow-r', 'arrow-lr',
|
||||
'html-comment',
|
||||
'ltgt-diamond-tag',
|
||||
'ltgt-slash-tag',
|
||||
|
@ -423,7 +428,7 @@ buildup = [
|
|||
'center-op-influence-dot',
|
||||
'--c-equality-inequality--',
|
||||
'--default-kern--',
|
||||
'arrow-r',
|
||||
'arrow-r', 'arrow-lr',
|
||||
'html-comment',
|
||||
'ltgt-diamond-tag',
|
||||
'ltgt-slash-tag',
|
||||
|
@ -443,7 +448,7 @@ buildup = [
|
|||
'center-op-influence-dot',
|
||||
'--c-equality-inequality--',
|
||||
'--default-kern--',
|
||||
'arrow-l', 'arrow-r',
|
||||
'arrow-l', 'arrow-r', 'arrow-lr',
|
||||
'trig',
|
||||
'llgg',
|
||||
'llggeq',
|
||||
|
@ -458,7 +463,7 @@ buildup = [
|
|||
'center-op-influence-dot',
|
||||
'--raku-equality-inequality--',
|
||||
'--default-kern--',
|
||||
'arrow-l', 'arrow-r',
|
||||
'arrow-l', 'arrow-r', 'arrow-lr',
|
||||
'trig',
|
||||
'llgg',
|
||||
'llggeq',
|
||||
|
@ -472,7 +477,7 @@ buildup = [
|
|||
'--default-center-ops--',
|
||||
'--ml-equality-inequality--',
|
||||
'--default-kern--',
|
||||
'arrow-l', 'arrow-r',
|
||||
'arrow-l', 'arrow-r', 'arrow-lr',
|
||||
'trig',
|
||||
'brst',
|
||||
'plusplus',
|
||||
|
@ -491,7 +496,7 @@ buildup = [
|
|||
'--default-center-ops--',
|
||||
'--fstar-equality-inequality--',
|
||||
'--default-kern--',
|
||||
'arrow-l', 'arrow-r',
|
||||
'arrow-l', 'arrow-r', 'arrow-lr',
|
||||
'trig',
|
||||
'brst',
|
||||
'plusplus',
|
||||
|
@ -506,7 +511,7 @@ buildup = [
|
|||
'center-op-influence-dot',
|
||||
'--haskell-equality-inequality--',
|
||||
'--default-kern--',
|
||||
'arrow-l', 'arrow-r',
|
||||
'arrow-l', 'arrow-r', 'arrow-lr',
|
||||
'counter-arrow-l', 'counter-arrow-r',
|
||||
'trig',
|
||||
'llgg',
|
||||
|
@ -537,7 +542,7 @@ buildup = [
|
|||
'--default-center-ops--',
|
||||
'--default-equality-inequality--',
|
||||
'--default-kern--',
|
||||
'arrow-l', 'arrow-r',
|
||||
'arrow-l', 'arrow-r', 'arrow-lr',
|
||||
'counter-arrow-l', 'counter-arrow-r',
|
||||
'trig',
|
||||
'slash-asterisk',
|
||||
|
@ -555,7 +560,7 @@ buildup = [
|
|||
'center-op-trigger-bar-r',
|
||||
'--default-equality-inequality--',
|
||||
'--default-kern--',
|
||||
'arrow-l', 'arrow-r',
|
||||
'arrow-l', 'arrow-r', 'arrow-lr',
|
||||
'counter-arrow-l', 'counter-arrow-r',
|
||||
'trig',
|
||||
'slash-asterisk',
|
||||
|
@ -572,7 +577,7 @@ buildup = [
|
|||
'center-op-influence-dot',
|
||||
'--ml-equality-inequality--',
|
||||
'--default-kern--',
|
||||
'arrow-l', 'arrow-r',
|
||||
'arrow-l', 'arrow-r', 'arrow-lr',
|
||||
'counter-arrow-l', 'counter-arrow-r',
|
||||
'trig',
|
||||
'llgg',
|
||||
|
@ -588,7 +593,7 @@ buildup = [
|
|||
'--default-center-ops--',
|
||||
'--matlab-equality-inequality--',
|
||||
'--default-kern--',
|
||||
'arrow-l', 'arrow-r',
|
||||
'arrow-l', 'arrow-r', 'arrow-lr',
|
||||
'trig',
|
||||
'llgg',
|
||||
'plusplus',
|
||||
|
@ -601,7 +606,7 @@ buildup = [
|
|||
'--default-center-ops--',
|
||||
'--verilog-equality-inequality--',
|
||||
'--default-kern--',
|
||||
'arrow-l', 'arrow-r',
|
||||
'arrow-l', 'arrow-r', 'arrow-lr',
|
||||
'trig',
|
||||
'slash-asterisk',
|
||||
'llgg',
|
||||
|
@ -618,7 +623,7 @@ buildup = [
|
|||
'--default-center-ops--',
|
||||
'--wolfram-equality-inequality--',
|
||||
'--default-kern--',
|
||||
'arrow-l', 'arrow-r',
|
||||
'arrow-l', 'arrow-r', 'arrow-lr',
|
||||
'trig',
|
||||
'ltgt-diamond',
|
||||
'brst',
|
||||
|
@ -635,7 +640,7 @@ buildup = [
|
|||
'--default-center-ops--',
|
||||
'--erlang-equality-inequality--',
|
||||
'--default-kern--',
|
||||
'arrow-l', 'arrow-r',
|
||||
'arrow-l', 'arrow-r', 'arrow-lr',
|
||||
'trig',
|
||||
'llgg'
|
||||
]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue