Compare commits
5 Commits
master
...
exclamatio
Author | SHA1 | Date | |
---|---|---|---|
|
2701c6e0ab | ||
|
a3607fe370 | ||
|
2dc5b05463 | ||
|
a2dae4d6c1 | ||
|
c75311bb86 |
@ -969,7 +969,7 @@ Public Sub Editors_KeyPress()
|
||||
|
||||
$bCheckSignature = True
|
||||
|
||||
Else If InStr("(),[]", Key.Text) Then
|
||||
Else If InStr("(),[]!", Key.Text) Then
|
||||
|
||||
$bCheckSignature = True
|
||||
|
||||
@ -1631,6 +1631,8 @@ Private Sub GetSymbolWith(aExpr As String[], aType As Integer[], Optional iInd A
|
||||
Dim iLine As Integer
|
||||
Dim aWith As String[]
|
||||
Dim aWithType As Integer[]
|
||||
Dim aWithNested As String[]
|
||||
Dim aWithTypeNested As Integer[]
|
||||
Dim iLevel As Integer
|
||||
Dim iAssign As Integer
|
||||
|
||||
@ -1655,6 +1657,22 @@ Private Sub GetSymbolWith(aExpr As String[], aType As Integer[], Optional iInd A
|
||||
Endif
|
||||
Next
|
||||
|
||||
' Nested WITHs
|
||||
If Left$(aWith[0]) = "." Then
|
||||
If Not aWithNested Then 'Lazy buffer allocations
|
||||
aWithNested = New String[]
|
||||
aWithTypeNested = New Integer[]
|
||||
Endif
|
||||
aWithNested.Insert(aWith, 0)
|
||||
aWithTypeNested.Insert(aWithType, 0)
|
||||
Continue
|
||||
Endif
|
||||
|
||||
If aWithNested Then
|
||||
aWith.Insert(aWithNested)
|
||||
aWithType.Insert(aWithTypeNested)
|
||||
Endif
|
||||
|
||||
aExpr.Insert(aWith, iInd)
|
||||
aType.Insert(aWithType, iInd)
|
||||
Return
|
||||
@ -1709,7 +1727,7 @@ Private Sub GetExpressionStart(aExpr As String[], aType As Integer[]) As Integer
|
||||
Endif
|
||||
bLastSymbol = False
|
||||
Continue
|
||||
Else If sPattern = "." Then
|
||||
Else If sPattern = "." Or sPattern = "!" Then
|
||||
bLastSymbol = False
|
||||
Continue
|
||||
Else If IsTypeSymbol(sPattern, aType[iInd]) Then
|
||||
@ -1831,7 +1849,7 @@ Public Function GetExpressionType(aExpr As String[], aType As Integer[], bPointA
|
||||
sType = $hSymbol.Type ' A method cannot return static classes
|
||||
$bLastStatic = False
|
||||
Endif
|
||||
Else If sPattern = "]" Then
|
||||
Else If sPattern = "]" Or sPattern = "!" Then
|
||||
|
||||
If Not sType Then ' Array constructor operator [ ... ]
|
||||
Return
|
||||
@ -1962,13 +1980,19 @@ Public Sub CheckCompletion(sMode As String)
|
||||
$bCheckSignature = True
|
||||
|
||||
sWord = $hCompletion.GetWord(sLine, $hEditor.Column - 1)
|
||||
If Right(sLine) <> "." And If Len(sLine) > Len(sWord) And If Mid$(sLine, Len(sLine) - Len(sWord), 1) = "." Then
|
||||
iPos = $hEditor.Column
|
||||
$hEditor.Goto($hEditor.Column - String.Len(sWord) - 2, $hEditor.Line)
|
||||
CheckCompletion(".")
|
||||
FCompletion.SetText(sWord)
|
||||
$hEditor.Goto(iPos, $hEditor.Line)
|
||||
Return
|
||||
If Right(sLine) <> "." And If Len(sLine) > Len(sWord) Then
|
||||
Select Case Mid$(sLine, Len(sLine) - Len(sWord), 1)
|
||||
Case "."
|
||||
iPos = $hEditor.Column
|
||||
$hEditor.Goto($hEditor.Column - String.Len(sWord) - 2, $hEditor.Line)
|
||||
CheckCompletion(".")
|
||||
FCompletion.SetText(sWord)
|
||||
$hEditor.Goto(iPos, $hEditor.Line)
|
||||
Return
|
||||
Case "!" 'Do not trigger completion form for index shortcut
|
||||
$hCompletion.Hide
|
||||
Return
|
||||
End Select
|
||||
Endif
|
||||
|
||||
If Len(sWord) >= 3 Then
|
||||
@ -2002,6 +2026,7 @@ Private Function GetExpressionSignature(aExpr As String[], aType As Integer[]) A
|
||||
Dim sPattern As String
|
||||
Dim sType As String
|
||||
Dim bNew As Boolean
|
||||
Dim bIndexShortcutEnded As Boolean
|
||||
|
||||
$hSymbol = Null
|
||||
$iArgSignature = 0
|
||||
@ -2027,6 +2052,10 @@ Private Function GetExpressionSignature(aExpr As String[], aType As Integer[]) A
|
||||
Break
|
||||
Else If sPattern = "," Then
|
||||
Inc $iArgSignature
|
||||
Else If sPattern = "." Or sPattern = "=" Then
|
||||
bIndexShortcutEnded = True
|
||||
Else If sPattern = "!" And bIndexShortcutEnded = False
|
||||
Break
|
||||
Endif
|
||||
|
||||
Next
|
||||
@ -2049,7 +2078,7 @@ Private Function GetExpressionSignature(aExpr As String[], aType As Integer[]) A
|
||||
Else
|
||||
Try $hSymbol = Project.Documentation.GetClassSymbols(sType)["_call"]
|
||||
Endif
|
||||
Else If sPattern = "[" Then
|
||||
Else If sPattern = "[" Or sPattern = "!" Then
|
||||
$hSymbol = Null
|
||||
Try $hSymbol = Project.Documentation.GetClassSymbols(sType)["_get"]
|
||||
Endif
|
||||
|
@ -1200,15 +1200,14 @@ void TRANS_label(void)
|
||||
|
||||
void TRANS_with(void)
|
||||
{
|
||||
control_enter(RS_WITH);
|
||||
if (!TRANS_affectation(TRUE))
|
||||
TRANS_expression(FALSE);
|
||||
|
||||
if (!TRANS_affectation(TRUE))
|
||||
TRANS_expression(FALSE);
|
||||
control_enter(RS_WITH);
|
||||
|
||||
CODE_pop_ctrl(current_ctrl->local);
|
||||
}
|
||||
|
||||
|
||||
void TRANS_use_with(void)
|
||||
{
|
||||
TRANS_CTRL *ctrl_inner = control_get_inner_with();
|
||||
|
Loading…
x
Reference in New Issue
Block a user