ParseWarning.st
author Jan Vrany <jan.vrany@labware.com>
Thu, 27 Oct 2022 14:53:59 +0100
branchjv
changeset 4735 3b11fb3ede98
parent 4349 3cbb3f48bcd0
permissions -rw-r--r--
Allow single underscore as method / block argument and temporaries This commit is a follow up for 38b221e.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3065
6128bec16783 class: ParseWarning
Claus Gittinger <cg@exept.de>
parents: 3061
diff changeset
     1
"
6128bec16783 class: ParseWarning
Claus Gittinger <cg@exept.de>
parents: 3061
diff changeset
     2
 COPYRIGHT (c) 1989 by Claus Gittinger
6128bec16783 class: ParseWarning
Claus Gittinger <cg@exept.de>
parents: 3061
diff changeset
     3
              All Rights Reserved
6128bec16783 class: ParseWarning
Claus Gittinger <cg@exept.de>
parents: 3061
diff changeset
     4
6128bec16783 class: ParseWarning
Claus Gittinger <cg@exept.de>
parents: 3061
diff changeset
     5
 This software is furnished under a license and may be used
6128bec16783 class: ParseWarning
Claus Gittinger <cg@exept.de>
parents: 3061
diff changeset
     6
 only in accordance with the terms of that license and with the
6128bec16783 class: ParseWarning
Claus Gittinger <cg@exept.de>
parents: 3061
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
6128bec16783 class: ParseWarning
Claus Gittinger <cg@exept.de>
parents: 3061
diff changeset
     8
 be provided or otherwise made available to, or used by, any
6128bec16783 class: ParseWarning
Claus Gittinger <cg@exept.de>
parents: 3061
diff changeset
     9
 other person.  No title to or ownership of the software is
6128bec16783 class: ParseWarning
Claus Gittinger <cg@exept.de>
parents: 3061
diff changeset
    10
 hereby transferred.
6128bec16783 class: ParseWarning
Claus Gittinger <cg@exept.de>
parents: 3061
diff changeset
    11
"
3061
c15acf373ee6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    12
"{ Package: 'stx:libcomp' }"
c15acf373ee6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    13
4102
b12adacf8da4 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3065
diff changeset
    14
"{ NameSpace: Smalltalk }"
b12adacf8da4 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3065
diff changeset
    15
3061
c15acf373ee6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    16
Notification subclass:#ParseWarning
c15acf373ee6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    17
	instanceVariableNames:'errorMessage startPosition endPosition lineNumber'
c15acf373ee6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    18
	classVariableNames:''
c15acf373ee6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    19
	poolDictionaries:''
c15acf373ee6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    20
	category:'System-Compiler'
c15acf373ee6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    21
!
c15acf373ee6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    22
3065
6128bec16783 class: ParseWarning
Claus Gittinger <cg@exept.de>
parents: 3061
diff changeset
    23
!ParseWarning class methodsFor:'documentation'!
6128bec16783 class: ParseWarning
Claus Gittinger <cg@exept.de>
parents: 3061
diff changeset
    24
6128bec16783 class: ParseWarning
Claus Gittinger <cg@exept.de>
parents: 3061
diff changeset
    25
copyright
6128bec16783 class: ParseWarning
Claus Gittinger <cg@exept.de>
parents: 3061
diff changeset
    26
"
6128bec16783 class: ParseWarning
Claus Gittinger <cg@exept.de>
parents: 3061
diff changeset
    27
 COPYRIGHT (c) 1989 by Claus Gittinger
6128bec16783 class: ParseWarning
Claus Gittinger <cg@exept.de>
parents: 3061
diff changeset
    28
              All Rights Reserved
6128bec16783 class: ParseWarning
Claus Gittinger <cg@exept.de>
parents: 3061
diff changeset
    29
6128bec16783 class: ParseWarning
Claus Gittinger <cg@exept.de>
parents: 3061
diff changeset
    30
 This software is furnished under a license and may be used
6128bec16783 class: ParseWarning
Claus Gittinger <cg@exept.de>
parents: 3061
diff changeset
    31
 only in accordance with the terms of that license and with the
6128bec16783 class: ParseWarning
Claus Gittinger <cg@exept.de>
parents: 3061
diff changeset
    32
 inclusion of the above copyright notice.   This software may not
6128bec16783 class: ParseWarning
Claus Gittinger <cg@exept.de>
parents: 3061
diff changeset
    33
 be provided or otherwise made available to, or used by, any
6128bec16783 class: ParseWarning
Claus Gittinger <cg@exept.de>
parents: 3061
diff changeset
    34
 other person.  No title to or ownership of the software is
6128bec16783 class: ParseWarning
Claus Gittinger <cg@exept.de>
parents: 3061
diff changeset
    35
 hereby transferred.
6128bec16783 class: ParseWarning
Claus Gittinger <cg@exept.de>
parents: 3061
diff changeset
    36
"
4311
ca85799f3fa7 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4102
diff changeset
    37
!
ca85799f3fa7 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4102
diff changeset
    38
ca85799f3fa7 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4102
diff changeset
    39
documentation
ca85799f3fa7 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4102
diff changeset
    40
"
ca85799f3fa7 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4102
diff changeset
    41
    Warnings generated by parsers (eg. the Smalltalk code parser).
ca85799f3fa7 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4102
diff changeset
    42
    In unhandled, a message is sent to the Transcript and the compilation proceeds.
ca85799f3fa7 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4102
diff changeset
    43
ca85799f3fa7 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4102
diff changeset
    44
    [author:]
ca85799f3fa7 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4102
diff changeset
    45
        Claus Gittinger
ca85799f3fa7 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4102
diff changeset
    46
ca85799f3fa7 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4102
diff changeset
    47
    [instance variables:]
ca85799f3fa7 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4102
diff changeset
    48
ca85799f3fa7 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4102
diff changeset
    49
    [class variables:]
ca85799f3fa7 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4102
diff changeset
    50
ca85799f3fa7 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4102
diff changeset
    51
    [see also:]
ca85799f3fa7 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4102
diff changeset
    52
ca85799f3fa7 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4102
diff changeset
    53
"
3065
6128bec16783 class: ParseWarning
Claus Gittinger <cg@exept.de>
parents: 3061
diff changeset
    54
! !
3061
c15acf373ee6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    55
c15acf373ee6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    56
!ParseWarning methodsFor:'accessing'!
c15acf373ee6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    57
c15acf373ee6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    58
endPosition
c15acf373ee6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    59
    ^ endPosition
c15acf373ee6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    60
!
c15acf373ee6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    61
c15acf373ee6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    62
endPosition:something
c15acf373ee6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    63
    endPosition := something.
c15acf373ee6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    64
!
c15acf373ee6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    65
c15acf373ee6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    66
errorMessage
c15acf373ee6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    67
    ^ errorMessage
c15acf373ee6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    68
!
c15acf373ee6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    69
c15acf373ee6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    70
errorMessage:something
c15acf373ee6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    71
    errorMessage := something.
c15acf373ee6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    72
!
c15acf373ee6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    73
c15acf373ee6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    74
lineNumber
c15acf373ee6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    75
    ^ lineNumber
c15acf373ee6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    76
!
c15acf373ee6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    77
c15acf373ee6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    78
lineNumber:something
c15acf373ee6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    79
    lineNumber := something.
c15acf373ee6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    80
!
c15acf373ee6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    81
c15acf373ee6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    82
startPosition
c15acf373ee6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    83
    ^ startPosition
c15acf373ee6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    84
!
c15acf373ee6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    85
c15acf373ee6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    86
startPosition:something
c15acf373ee6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    87
    startPosition := something.
4349
3cbb3f48bcd0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4311
diff changeset
    88
!
3cbb3f48bcd0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4311
diff changeset
    89
3cbb3f48bcd0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4311
diff changeset
    90
startPosition:startPositionArg endPosition:endPositionArg 
3cbb3f48bcd0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4311
diff changeset
    91
    startPosition := startPositionArg.
3cbb3f48bcd0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4311
diff changeset
    92
    endPosition := endPositionArg.
3061
c15acf373ee6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    93
! !
c15acf373ee6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    94
4102
b12adacf8da4 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3065
diff changeset
    95
!ParseWarning methodsFor:'default action'!
b12adacf8da4 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3065
diff changeset
    96
b12adacf8da4 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3065
diff changeset
    97
defaultResumeValue
b12adacf8da4 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3065
diff changeset
    98
    Logger warning:('Parser Warning: ',(self errorMessage ? self description)).
b12adacf8da4 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3065
diff changeset
    99
    ^ super defaultResumeValue
b12adacf8da4 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3065
diff changeset
   100
! !
b12adacf8da4 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3065
diff changeset
   101
3061
c15acf373ee6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   102
!ParseWarning class methodsFor:'documentation'!
c15acf373ee6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   103
c15acf373ee6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   104
version
4102
b12adacf8da4 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3065
diff changeset
   105
    ^ '$Header$'
3061
c15acf373ee6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   106
!
c15acf373ee6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   107
c15acf373ee6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   108
version_CVS
4102
b12adacf8da4 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3065
diff changeset
   109
    ^ '$Header$'
3061
c15acf373ee6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   110
! !
c15acf373ee6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   111