StringConcat

String concatenation, an expr node.

声明

语法

StringConcat(expr left, expr right, ttype type, expr? value)

参数

Argument Name

Argument Description

left

left string

right

right string

type

table entry type

value

expression value

返回值

The return value is the expression that the StringConcat represents.

描述

StringConcat represents string concatenation. Two strings can be combined one after the other using this node.

类型

Only accepts strings.

示例

"left"//"right"

ASR:

(TranslationUnit
    (SymbolTable
        1
        {

        })
    [(StringConcat
        (StringConstant
            "left"
            (Character 1 4 () [])
        )
        (StringConstant
            "right"
            (Character 1 5 () [])
        )
        (Character 1 9 () [])
        (StringConstant
            "leftright"
            (Character 1 9 () [])
        )
    )]
)

也可以看看