Skip to content

Structured Text language support#2311

Merged
RunDevelopment merged 5 commits into
PrismJS:masterfrom
Serhioromano:master
Apr 12, 2020
Merged

Structured Text language support#2311
RunDevelopment merged 5 commits into
PrismJS:masterfrom
Serhioromano:master

Conversation

@Serhioromano

Copy link
Copy Markdown
Contributor

New PR with clean Prism fork

@RunDevelopment RunDevelopment left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two more things and we can merge this.

Comment thread components.json Outdated
Comment thread components/prism-iecst.js Outdated
Comment thread components/prism-iecst.js Outdated
Serhioromano and others added 2 commits April 12, 2020 21:57
@Serhioromano

Copy link
Copy Markdown
Contributor Author

You are obviously good at Regex. Although mine regex works, I see how your suggestions are better. I've learned some new things today.еhank you for taking the time and explaining your changes.

@Serhioromano

Copy link
Copy Markdown
Contributor Author

Again! What now? I cannot find errors. It was all green. After you request changes, I resolve them all but it always continues to show that I have one change request.

What do I do not? I did not do anything, just changed the language name and accepted your proposals.

@Serhioromano

Copy link
Copy Markdown
Contributor Author

🥺 Accept it already!!

@maddie

maddie commented Apr 12, 2020

Copy link
Copy Markdown

Hmm, some of the comments seem to be missed by the regex:

image

Code:

PROGRAM PLC_PRG
VAR
	iSize: INT;(*发送数据的组数*)
	sTritonDataSend: TritonDataSend;		(*发送的数据的结构体,结构体中发送数据的结构体中的szKey和szValue长度均为64个字节(由于内存长度限制)*)
	sTritonDataRecv: TritonDataRecv;(*从Neptune获取的数据*)
	itriton_status: INT;			(*获取和Neptune连接状态*)
	aTempKey: ARRAY [0..99] OF string;
	aTempNote: ARRAY [0..99] OF string;
	strJsonData: ARRAY [0..9] OF JsonDataString;
	struuid: STRING;				(*获取Triton配置的设备序列号*)
	intuuid: ARRAY [0..99] OF BYTE;	(*获取设备*)
	(*
	  需要在<数据类型>中定义以下结构体:
	  TYPE JsonDataString :
        STRUCT
        szKey:STRING;
        szValue:STRING;
        END_STRUCT
      END_TYPE
	*)
	loop: WORD := 1000; (* 1000ms给一次实时数据 *)
	rt: INT;(*调用接口函数返回值*)
	i: INT := 1;
	Delay: TON;
	irandom: INT;
	baction_done: BOOL;

END_VAR

EDIT: I guess it could be because of the whitespace before the opening bracket are tabs instead of spaces.

EDIT 2: Never mind. It's the brackets. They were Chinese symbols 😂

@RunDevelopment

Copy link
Copy Markdown
Member

🥺 Accept it already!!

We are basically there already. Just some formatting and I'll merge this.

@Serhioromano

Copy link
Copy Markdown
Contributor Author

iSize: INT;(发送数据的组数)
sTritonDataSend: TritonDataSend; (发送的数据的结构体,结构体中发送数据的结构体中的szKey和szValue长度均为64个字节(由于内存长度限制))
sTritonDataRecv: TritonDataRecv;(从Neptune获取的数据)
itriton_status: INT; (获取和Neptune连接状态
aTempKey: ARRAY [0..99] OF string;
aTempNote: ARRAY [0..99] OF string;
strJsonData: ARRAY [0..9] OF JsonDataString;
struuid: STRING; (获取Triton配置的设备序列号
intuuid: ARRAY [0..99] OF BYTE; (获取设备
(*
需要在<数据类型>中定义以下结构体:
TYPE JsonDataString :
STRUCT
szKey:STRING;
szValue:STRING;
END_STRUCT
END_TYPE
*)

Somehow the ( is not a bracket. You can even see it in the code it is different. I change it to bracket and it works.

@Serhioromano

Copy link
Copy Markdown
Contributor Author

🥺 Accept it already!!

We are basically there already. Just some formatting and I'll merge this.

So what else should I do?

@RunDevelopment

Copy link
Copy Markdown
Member

This.

@RunDevelopment

Copy link
Copy Markdown
Member

Btw. the is a "FULLWIDTH LEFT PARENTHESIS". I don't think ST supports this, does it?

@RunDevelopment
RunDevelopment merged commit 8704cdf into PrismJS:master Apr 12, 2020
@RunDevelopment

Copy link
Copy Markdown
Member

Thank you for contributing @Serhioromano!

@Serhioromano

Copy link
Copy Markdown
Contributor Author

Btw. the is a "FULLWIDTH LEFT PARENTHESIS". I don't think ST supports this, does it?

No it doesn't

quentinvernot pushed a commit to TankerHQ/prismjs that referenced this pull request Sep 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants