Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Structured Text language support #2311

Merged
merged 5 commits into from
Apr 12, 2020
Merged

Structured Text language support #2311

merged 5 commits into from
Apr 12, 2020

Conversation

Serhioromano
Copy link
Contributor

New PR with clean Prism fork

Copy link
Member

@RunDevelopment RunDevelopment left a comment

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.

components.json Outdated Show resolved Hide resolved
components/prism-iecst.js Outdated Show resolved Hide resolved
Serhioromano and others added 2 commits April 12, 2020 21:57
Co-Authored-By: Michael Schmidt <mitchi5000.ms@googlemail.com>
@Serhioromano
Copy link
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
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
Contributor Author

🥺 Accept it already!!

@maddie
Copy link

maddie commented Apr 12, 2020

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
Member

🥺 Accept it already!!

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

@Serhioromano
Copy link
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
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
Member

This.

@RunDevelopment
Copy link
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
Member

Thank you for contributing @Serhioromano!

@Serhioromano
Copy link
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