tools/JavaParseNodeBuilder.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Sat, 19 Jan 2013 19:23:53 +0000
branchrefactoring-vmdata
changeset 1983 03dcc3899eea
parent 1879 7d232ff32dde
child 2069 75d40b7b986f
permissions -rw-r--r--
Make all native methods source ending with ': nativeContext'. This will ease automatic refactoring. Also, rename method categories with prefix 'OLD -'.

"{ Package: 'stx:libjava/tools' }"

Object subclass:#JavaParseNodeBuilder
	instanceVariableNames:'start stop line'
	classVariableNames:''
	poolDictionaries:''
	category:'Languages-Java-Parser-AST'
!

!JavaParseNodeBuilder class methodsFor:'documentation'!

documentation
"
    documentation to be added.

    [author:]
        Jan Vrany <jan.vrany@fit.cvut.cz>

    [instance variables:]

    [class variables:]

    [see also:]

"
! !

!JavaParseNodeBuilder methodsFor:'accessing'!

start: startPos stop: stopPos

    start := startPos.
    stop := stopPos.

    "Created: / 09-03-2012 / 16:52:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

start: startPos stop: stopPos line: lineNr

    start := startPos.
    stop := stopPos.
    line := lineNr

    "Created: / 09-03-2012 / 16:53:12 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!JavaParseNodeBuilder methodsFor:'building'!

newComment: text

    ^(self new: JavaCommentNode) value: text

    "Created: / 09-03-2012 / 17:01:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

newJavaDoc: text

    ^(self new: JavaDocNode) value: text

    "Created: / 09-03-2012 / 17:06:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

newStringLiteral: string

    "Nothing to do"

    "Created: / 17-03-2012 / 17:32:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!JavaParseNodeBuilder methodsFor:'building-private'!

new: nodeClass

    ^nodeClass new
        startPosition: start;
        endPosition: stop;
        lineNumber: line;
        yourself

    "Created: / 09-03-2012 / 16:54:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!JavaParseNodeBuilder class methodsFor:'documentation'!

version_HG

    ^ '$Changeset: <not expanded> $'
!

version_SVN
    ^ '§Id§'
! !